nparam function

Number of parameters and number of variates in the model

Number of parameters and number of variates in the model

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

nparam(object, ...) nvariate(object, ...)

Arguments

  • object: Time series model.
  • ...: Some other parameters passed to the method.

Returns

Both functions return numeric values.

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

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)

See Also

nobs , logLik

Author(s)

Ivan Svetunkov, ivan@svetunkov.com

  • Maintainer: Ivan Svetunkov
  • License: LGPL-2.1
  • Last published: 2025-04-04