Learn R Programming

PMmisc (version 0.1.2)

reg.bic: BIC for lm.fit

Description

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

Usage

reg.bic(fit,w)

Arguments

fit

:the outcome of lm.fit

w

:wright

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)
w <- rep(1,length(Y))
reg.bic(fit,w)
# }

Run the code above in your browser using DataLab