R/ls.function.R

Defines functions ols.function

ols.function <- function(X, y, vcov = FALSE) {
	res <- list()
	if(vcov) {
		res$vcov <- solve(crossprod(X)) 
		res$coeff <- res$vcov%*%crossprod(X,y)
	} else {
		res$coeff <- try(solve(crossprod(X), crossprod(X,y)), silent = TRUE)	
	}
	res	
}

Try the ROCnReg package in your browser

Any scripts or data that you put into this service are public.

ROCnReg documentation built on March 31, 2023, 5:42 p.m.