R/psfmi_mm_multiparm.R
psfmi_mm_multiparm.Rd
psfmi_mm_multiparm
Function to pool according to D1, D2 and D3 methods
psfmi_mm_multiparm(
data,
nimp,
impvar,
Outcome,
P,
p.crit,
family,
random.eff,
method,
print.method
)
Data frame with stacked multiple imputed datasets. The original dataset that contains missing values must be excluded from the dataset. The imputed datasets must be distinguished by an imputation variable, specified under impvar, and starting by 1 and the clusters should be distinguished by a cluster variable, specified under clusvar.
A numerical scalar. Number of imputed datasets. Default is 5.
A character vector. Name of the variable that distinguishes the imputed datasets.
Character vector containing the name of the outcome variable.
Character vector with the names of the predictor variables. At least one predictor variable has to be defined.
A numerical scalar. P-value selection criterium. A value of 1 provides the pooled model without selection.
Character vector to specify the type of model, "linear" is used to
call the lmer
function and "binomial" is used to call the glmer
function of the lme4
package. See details for more information.
Character vector to specify the random effects as used by the
lmer
and glmer
functions of the lme4
package.
A character vector to indicate the pooling method for p-values to pool the total model or used during predictor selection. This can be "D1", "D2", "D3" or "MPR". See details for more information.
logical vector. If TRUE full matrix with p-values of all variables according to chosen method (under method) is shown. If FALSE (default) p-value for categorical variables according to method are shown and for continuous and dichotomous predictors Rubin’s Rules are used.
if (FALSE) {
psfmi_mm_multiparm(data=ipdna_md, nimp=5, impvar=".imp", family="linear",
P=c("gender", "bnp", "dbp", "lvef", "bmi_cat"),
random.eff="( 1 | centre)", Outcome="sbp",
p.crit=0.05, method="D1", print.method = FALSE)
}