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

View source: R/methods.R

nparamR Documentation

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

Arguments

object

Time series model.

...

Some other parameters passed to the method.

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

Value

Both functions return numeric values.

Author(s)

Ivan Svetunkov, ivan@svetunkov.ru

See Also

nobs, logLik

Examples


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


greybox documentation built on Sept. 16, 2023, 9:07 a.m.