nparam | R Documentation |
nparam()
returns the number of estimated parameters in the model,
while nvariate()
returns number of variates for the response
variable.
nparam(object, ...)
nvariate(object, ...)
object |
Time series model. |
... |
Some other parameters passed to the method. |
nparam()
is a very basic and a simple function which does what it says:
extracts number of estimated parameters in the model. nvariate()
returns
number of variates (dimensions, columns) for the response variable (1 for the
univariate regression).
Both functions return numeric values.
Ivan Svetunkov, ivan@svetunkov.com
nobs, logLik
### Simple example
xreg <- cbind(rnorm(100,10,3),rnorm(100,50,5))
xreg <- cbind(100+0.5*xreg[,1]-0.75*xreg[,2]+rnorm(100,0,3),xreg,rnorm(100,300,10))
colnames(xreg) <- c("y","x1","x2","Noise")
ourModel <- lm(y~.,data=as.data.frame(xreg))
nparam(ourModel)
nvariate(ourModel)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.