BIFIE.univar.Rd
Computes some univariate descriptive statistics (means and standard deviations).
Object of class BIFIEdata
Vector of variables for which statistics should be computed
Optional grouping variable(s)
Optional vector of grouping values. This can be omitted and grouping values will be determined automatically.
Optional logical indicating whether statistical inference based on replication should be employed.
Object of class BIFIE.univar
Number of digits for rounding output
Further arguments to be passed
A list with following entries
Data frame with univariate statistics
Data frame with means
Data frame with standard deviations
Extensive output with all replicated statistics
More values
See BIFIE.univar.test
for a test of equal means and
effect sizes \(\eta\) and \(d\).
Descriptive statistics without statistical inference can be
estimated by the collection of
miceadds::ma.wtd.statNA
functions from the miceadds package.
Further descriptive functions:
survey::svymean
,
intsvy::timss.mean
,
intsvy::timss.mean.pv
,
stats::weighted.mean
,
Hmisc::wtd.mean
,
miceadds::ma.wtd.meanNA
survey::svyvar
,
Hmisc::wtd.var
,
miceadds::ma.wtd.sdNA
,
miceadds::ma.wtd.covNA
#############################################################################
# EXAMPLE 1: Imputed TIMSS dataset
#############################################################################
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 ] )
# compute descriptives for plausible values
res1 <- BIFIEsurvey::BIFIE.univar( bdat, vars=c("ASMMAT","ASSSCI","books") )
summary(res1)
# split descriptives by number of books
res2 <- BIFIEsurvey::BIFIE.univar( bdat, vars=c("ASMMAT","ASSSCI"), group="books",
group_values=1:5)
summary(res2)
#############################################################################
# EXAMPLE 2: TIMSS dataset with missings
#############################################################################
data(data.timss2)
data(data.timssrep)
# use first dataset with missing data from data.timss2
bdat1 <- BIFIEsurvey::BIFIE.data( data.list=data.timss2[[1]], wgt=data.timss2[[1]]$TOTWGT,
wgtrep=data.timssrep[, -1 ])
# some descriptive statistics without statistical inference
res1a <- BIFIEsurvey::BIFIE.univar( bdat1, vars=c("ASMMAT","ASSSCI","books"), se=FALSE)
# descriptive statistics with statistical inference
res1b <- BIFIEsurvey::BIFIE.univar( bdat1, vars=c("ASMMAT","ASSSCI","books") )
summary(res1a)
summary(res1b)
# split descriptives by number of books
res2 <- BIFIEsurvey::BIFIE.univar( bdat1, vars=c("ASMMAT","ASSSCI"), group="books")
# Note that if group_values is not specified as an argument it will be
# automatically determined by the observed frequencies in the dataset
summary(res2)