propdiff_wald function

Calculates the difference between proportions and standard error according to Wald

Calculates the difference between proportions and standard error according to Wald

propdiff_wald Calculates the difference between proportions and standard error according to Wald and degrees of freedom to be used in function with.miceafter.

propdiff_wald(y, x, formula, data, strata = FALSE)

Arguments

  • y: 0-1 binary response variable.
  • x: 0-1 binary independent variable.
  • formula: A formula object to specify the model as normally used by glm.
  • data: An objects of class milist, created by df2milist, list2milist or mids2milist.
  • strata: If TRUE the proportion, se and n of each group is provided. Default is FALSE. Has to be used in combination with function pool_propdiff_wilson

Returns

The difference between proportions, standard error and complete data degrees of freedom (dfcom) as n-1.

Examples

imp_dat <- df2milist(lbpmilr, impvar="Impnr") ra <- with(imp_dat, expr=propdiff_wald(Chronic ~ Radiation)) # proportions in each subgroup imp_dat <- df2milist(lbpmilr, impvar="Impnr") ra <- with(imp_dat, expr=propdiff_wald(Chronic ~ Radiation, strata=TRUE))

See Also

with.milist, pool_propdiff_nw

Author(s)

Martijn Heymans, 2021

  • Maintainer: Martijn Heymans
  • License: GPL (>= 2)
  • Last published: 2022-10-02