R/adjCov.r

Defines functions adjCov

Documented in adjCov

adjCov <- function(x, id){

scores <- aCov(x)

scores <- aggregate.data.frame(scores,by=list(id),FUN=sum)[,-1]
nclusters <- dim(scores)[1]
meat   <- (nclusters-1)*var(scores)
covsan <- x$Vb %*% meat %*% x$Vb

x$Vb <- covsan

rm(scores, nclusters, meat, covsan)

x

}

Try the SemiParBIVProbit package in your browser

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

SemiParBIVProbit documentation built on June 20, 2017, 9:03 a.m.