BSkyCrossTable: Crosstab

View source: R/crosstab with weights.R

BSkyCrossTableR Documentation

Crosstab

Description

Creates crosstab with row, column and layer variables and optionally displays the following Expected counts Row and column percentages Unstandardized, standardized and adjusted residuals Chisq with odds ratio, McNemar and Fisher statistics

Usage

BSkyCrossTable(
  data = NULL,
  x = NA,
  y = NA,
  layers = NA,
  weight = NA,
  digits = 3,
  max.width = 5,
  expected = FALSE,
  prop.r = FALSE,
  prop.c = FALSE,
  prop.t = FALSE,
  prop.chisq = FALSE,
  chisq = FALSE,
  fisher = FALSE,
  mcnemar = FALSE,
  resid = FALSE,
  sresid = FALSE,
  asresid = FALSE,
  missing.include = TRUE,
  dnn = NULL,
  datasetname = NULL,
  bSkyHandleSplit = TRUE,
  long_table = FALSE,
  debug = FALSE
)

Arguments

x

row variable

y

column variable

layers

one or more variables for layers

expected

Expected counts are generated if this is TRUE

prop.r

Row percentages are produced if this is TRUE

prop.c

Column percentages are generated if this is TRUE

chisq

if TRUE generates chi-square table

resid

if TRUE, unstandardized residual are generated

sresid

if TRUE, standardized residuals are generated

asresid

if TRUE, adjusted residuals are generated

datasetname

Name of the dataset from which x,y and layers (variables) are chosen

weights

a numeric variable containing the frequency weights

Value

A list with the results

Examples

BSky_Multiway_Cross_Tab = BSkyCrossTable(x=c('manufact'),y=c('model'),
layers=c('type'),datasetname='Dataset2',
chisq = FALSE,prop.r=FALSE,prop.c=FALSE,
resid=FALSE,sresid=FALSE,expected=FALSE,
asresid=FALSE)
BSkyFormat(BSky_Multiway_Cross_Tab)

BlueSkyStatistics/BlueSky documentation built on April 14, 2025, 7:39 a.m.