Learn R Programming

BIFIEsurvey (version 1.5-0)

BIFIE.crosstab: Cross Tabulation

Description

Creates cross tabulations and computes some effect sizes.

Usage

BIFIE.crosstab( BIFIEobj , vars1 , vars2 , vars_values1 = NULL , vars_values2 = NULL , 
     group=NULL , group_values=NULL , se=TRUE )

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

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

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

Arguments

BIFIEobj
Object of class BIFIEdata
vars1
Row variable
vars2
Column variable
vars_values1
Optional vector of values of variable vars1
vars_values2
Optional vector of values of variable vars2
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.univar
digits
Number of digits for rounding output
...
Further arguments to be passed

Value

  • A list with following entries
  • stat.probsStatistics for joint and conditional probabilities
  • stat.margStatistics for marginal probabilities
  • stat.esStatistics for effect sizes $w$ (based on $\chi^2$), Cramers $V$, Goodman's gamma, the PRE lambda measure and Kruskals tau.
  • chisq.testTable with chi square statistics (ignoring weights and sampling scheme)
  • outputExtensive output with all replicated statistics
  • ...More values

See Also

survey::svytable, Hmisc::wtd.table

Examples

Run this code
#############################################################################
# EXAMPLE 1: Imputed TIMSS dataset
#############################################################################

data(data.timss1)
data(data.timssrep)

# create BIFIE.dat object
bifieobj <- BIFIE.data( data.list=data.timss1 , wgt=  data.timss1[[1]]$TOTWGT ,
           wgtrep=data.timssrep[, -1 ] )

#--- Model 1: cross tabulation           
res1 <- BIFIE.crosstab( bifieobj , vars1="migrant" , vars2 = "books" , group="female" )
summary(res1)

Run the code above in your browser using DataLab