BIFIE.freq: Frequency Statistics

Description Usage Arguments Value See Also Examples

View source: R/BIFIE.freq.R

Description

Computes absolute and relative frequencies.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
BIFIE.freq(BIFIEobj, vars, group=NULL, group_values=NULL, se=TRUE)

## S3 method for class 'BIFIE.freq'
summary(object,digits=3,...)

## S3 method for class 'BIFIE.freq'
coef(object,...)

## S3 method for class 'BIFIE.freq'
vcov(object,...)

Arguments

BIFIEobj

Object of class BIFIEdata

vars

Vector of variables for which statistics should be computed

group

Optional grouping variable(s)

group_values

Optional vector of grouping values. This can be omitted and grouping values will be determined automatically.

se

Optional logical indicating whether statistical inference based on replication should be employed.

object

Object of class BIFIE.freq

digits

Number of digits for rounding output

...

Further arguments to be passed

Value

A list with following entries

stat

Data frame with frequency statistics

output

Extensive output with all replicated statistics

...

More values

See Also

survey::svytable, intsvy::timss.table, Hmisc::wtd.table

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#############################################################################
# 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 ] )

# Frequencies for three variables
res1 <- BIFIEsurvey::BIFIE.freq( bdat, vars=c("lang", "books", "migrant" )  )
summary(res1)

# Frequencies splitted by gender
res2 <- BIFIEsurvey::BIFIE.freq( bdat, vars=c("lang", "books", "migrant" ),
              group="female", group_values=0:1 )
summary(res2)

# Frequencies splitted by gender and likesc
res3 <- BIFIEsurvey::BIFIE.freq( bdat, vars=c("lang", "books", "migrant" ),
              group=c("likesc","female")  )
summary(res3)

BIFIEsurvey documentation built on Dec. 11, 2018, 5:05 p.m.