R/mse.R

Defines functions mse

mse<-function(repstat, design){
       v<-attr(repstat,"var")
       center<-attr(v,"means")
       if ((length(v)!=length(center)^2) && (length(v)==length(center))){
         attr(repstat,"var")<-vcov(repstat)+(center-coef(repstat))^2*sum(design$rscales)*design$scale
       } else {
         attr(repstat,"var")<-as.matrix(vcov(repstat)+outer((center-coef(repstat)))*sum(design$rscales)*design$scale)
       }
       repstat
       }
bschneidr/fastsurvey documentation built on March 13, 2024, 11:12 a.m.