R/ETA_AUX.R

########################################################################
# ETA AUX FUNCTIONS
########################################################################
eta.func <- function(x, y, svydes){
  withReplicates(svydes, function(w,data){
    mod <- lm(x~factor(y), weights = w)
    anova.res <- anova(mod)
    SS <- anova.res[,2]
    eta2 <- SS[1]/sum(SS)
    sqrt(eta2)})}

Try the svyPVpack package in your browser

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

svyPVpack documentation built on May 1, 2019, 8:45 p.m.