missingTable: Table of missingness counts by groups.

View source: R/missingTable.R

missingTableR Documentation

Table of missingness counts by groups.

Description

This functions returns a table with the non-available frequencies from a already build bivariate table.

Usage

missingTable(obj,...)

Arguments

obj

either a 'compareGroups' or 'createTable' object.

...

other arguments passed to createTable.

Value

An object of class 'createTable'. For further details, see 'value' section of createTable help file.

Note

This function returns an object of class 'createTable', and therefore all methods implemented for 'createTable' objects can be applied, except the 'update' method.

All arguments of createTable can be passed throught '...' argument, except 'hide.no' argument which is fixed inside the code and cannot be changed.

This function cannot be applied to stratified tables, i.e. 'rbind.createTable' and 'cbind.createTable'. If stratified missingness table is desired, apply this function first to each table and then use cbind.createTable or/and rbind.createTable functions to combine exactly in the same way as 'createTable' objects. See 'example' section below.

See Also

createTable

Examples



require(compareGroups)

# load regicor data
data(regicor)

# table of descriptives by recruitment year
res <- compareGroups(year ~ age + sex + smoker + sbp + histhtn + 
         chol + txchol + bmi + phyact + pcs + death, regicor)
restab <- createTable(res, hide.no = "no")

# missingness table
missingTable(restab,type=1)


## Not run: 

# also create the missing table from a compareGroups object
miss <- missingTable(res)
miss

# some methods that works for createTable objects also works for objects 
#   computed by missTable function.
miss[1:4]
varinfo(miss)
plot(miss)

#... but update methods cannot be applied (this returns an error).
update(miss,type=2) 


## End(Not run)



compareGroups documentation built on Oct. 12, 2023, 1:08 a.m.