Usage
washb_glmFormat(glmModel = glmModel, rfit, dmat, rowdropped, contrast, pair,
vcovCL, family = family, V = NULL, Subgroups = NULL, print = print,
verbose = verbose)
Arguments
- glmModel
- glm model fit passed through the function and added to the output list
- rfit
- output from coeftest with fit and sandwich SE
- dmat
- dataframe used within the washb_glm function to fit data
- rowdropped
- dummy vector indexing rows of data dropped because a var contained missing data, to be read through the function and added to the formatted output.
- contrast
- Vector of length 2 that includes the groups to contrast, e.g., c("Control","Water")
- pair
- Pair-matched randomization ID variable (in WASH Benefits: block)
- vcovCL
- sandwichSE function output
- family
- GLM model family (gaussian, binomial, poisson, or negative binomial). Use "neg.binom" for Negative binomial.
- V
- Optional vector of variable names for subgroup analyses, which are interacted with 'tr'.
- Subgroups
- Names of subgroups created by the interaction between treatment and V factor.
- print
- Logical for whether to print function output
- verbose
- Logical for whether to print names and descriptions of returned list objects
Value
Returns a list of the risk ratios or risk differences, the variance-covariance matrix, and a vector indexing the rows of observations
used to fit the glm model
Description
Internal package function used to format the output of glm objects.
Examples