View source: R/BIFIE.univar.test.R
BIFIE.univar.test | R Documentation |
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 class 'BIFIE.univar.test'
summary(object,digits=4,...)
BIFIE.method |
Object of class |
wald_test |
Optional logical indicating whether a Wald test should be performed. |
object |
Object of class |
digits |
Number of digits for rounding output |
... |
Further arguments to be passed |
A list with following entries
stat.F |
Data frame with |
stat.eta |
Data frame with |
stat.dstat |
Data frame with Cohen's |
... |
More values |
BIFIE.univar
#############################################################################
# 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)
## Not run:
#**** 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, ]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.