Learn R Programming

greybox (version 2.0.2)

nparam: Number of parameters and number of variates in the model

Description

nparam() returns the number of estimated parameters in the model, while nvariate() returns number of variates for the response variable.

Usage

nparam(object, ...)

nvariate(object, ...)

Value

Both functions return numeric values.

Arguments

object

Time series model.

...

Some other parameters passed to the method.

Author

Ivan Svetunkov, ivan@svetunkov.ru

Details

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).

See Also

Examples

Run this code

### 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)

Run the code above in your browser using DataLab