nParam {micEcon} | R Documentation |
This function returns the number of model parameters. The default
method returns the component x$param$nParam
.
nParam(x, ...) ## Default S3 method: nParam(x, ...) ## S3 method for class 'lm': nParam(x, ...)
x |
a statistical model |
... |
other arguments for methods |
Not all parameters need to be free nor independent. The number may depend on the normalisation.
Number of parameters in the model
Ott Toomet, otoomet@econ.au.dk
nObs
for number of observations
# Construct a simple OLS regression: x1 <- runif(100) x2 <- runif(100) y <- 3 + 4*x1 + 5*x2 + rnorm(100) m <- lm(y~x1+x2) # estimate it summary(m) nParam(m) # you get 3