BIFIE.univar.test.Rd
Computes a Wald test which tests equality of means (univariate analysis of variance). In addition, the \(d\) and \(\eta\) effect sizes are computed.
BIFIE.univar.test(BIFIE.method, wald_test=TRUE)
# S3 method for BIFIE.univar.test
summary(object,digits=4,...)
Object of class BIFIE.univar
Optional logical indicating whether a Wald test should be performed.
Object of class BIFIE.univar.test
Number of digits for rounding output
Further arguments to be passed
A list with following entries
Data frame with \(F\) statistic for Wald test
Data frame with \(\eta\) effect size and its inference
Data frame with Cohen's \(d\) effect size and its inference
More values
#############################################################################
# EXAMPLE 1: Imputed TIMSS dataset - One grouping variable
#############################################################################
data(data.timss1)
data(data.timssrep)
# create BIFIE.dat object
bdat <- BIFIEsurvey::BIFIE.data( data.list=data.timss1, wgt=data.timss1[[1]]$TOTWGT,
wgtrep=data.timssrep[, -1 ] )
#**** Model 1: 3 variables splitted by book
res1 <- BIFIEsurvey::BIFIE.univar( bdat, vars=c("ASMMAT", "ASSSCI","scsci"),
group="books")
summary(res1)
# analysis of variance
tres1 <- BIFIEsurvey::BIFIE.univar.test(res1)
summary(tres1)
#**** Model 2: One variable splitted by gender
res2 <- BIFIEsurvey::BIFIE.univar( bdat, vars=c("ASMMAT"), group="female" )
summary(res2)
# analysis of variance
tres2 <- BIFIEsurvey::BIFIE.univar.test(res2)
summary(tres2)
if (FALSE) {
#**** Model 3: Univariate statistic: math
res3 <- BIFIEsurvey::BIFIE.univar( bdat, vars=c("ASMMAT") )
summary(res3)
tres3 <- BIFIEsurvey::BIFIE.univar.test(res3)
#############################################################################
# EXAMPLE 2: Imputed TIMSS dataset - Two grouping variables
#############################################################################
data(data.timss1)
data(data.timssrep)
# create BIFIE.dat object
bdat <- BIFIEsurvey::BIFIE.data( data.list=data.timss1, wgt=data.timss1[[1]]$TOTWGT,
wgtrep=data.timssrep[, -1 ] )
#**** Model 1: 3 variables splitted by book and female
res1 <- BIFIEsurvey::BIFIE.univar(bdat, vars=c("ASMMAT", "ASSSCI","scsci"),
group=c("books","female"))
summary(res1)
# analysis of variance
tres1 <- BIFIEsurvey::BIFIE.univar.test(res1)
summary(tres1)
# extract data frame with Cohens d statistic
dstat <- tres1$stat.dstat
# extract d values for gender comparisons with same value of books
# -> 'books' refers to the first variable
ind <- which(
unlist( lapply( strsplit( dstat$groupval1, "#"), FUN=function(vv){vv[1]}) )==
unlist( lapply( strsplit( dstat$groupval2, "#"), FUN=function(vv){vv[1]}) )
)
dstat[ ind, ]
}