Learn R Programming

PMmisc (version 0.1.2)

reg.dof: Degree of freedom for lim.fit

Description

Calculate degree of freedom for the outcome of lm.fit(). This function is built for reg.linreg for higher efficiency only. It can't be used for calculating degree of freedom in general operation.

Usage

reg.dof(fit)

Arguments

fit

:outcome of lm.f

Examples

Run this code
# NOT RUN {
X <- as.matrix(cbind(1,EuStockMarkets[,1:2])) # create the design matrix
Y <- as.data.frame(EuStockMarkets)$FTSE
fit <- lm.fit(x = X, y = Y)
reg.dof(fit)
# }

Run the code above in your browser using DataLab