Learn R Programming

JointAI (version 0.1.0)

predDF: Create a new dataframe for prediction

Description

Build a data.frame for prediction, where one variable varies and all other variables are set to the reference value (median for continuous variables.)

Usage

predDF(...)

# S3 method for formula predDF(formula, dat, var, ...)

# S3 method for JointAI predDF(object, var, ...)

Arguments

...

optional, additional arguments (currently not used)

formula

model formula (only fixed effects)

dat

original data

var

name of variable that should be varying

object

object inheriting from class JointAI

See Also

predict.JointAI, lme_imp, glm_imp, lm_imp

Examples

Run this code
# NOT RUN {
mod <- lm_imp(y~C1 + C2 + M2, data = wideDF, n.iter = 100)
newDF <- predDF(mod, var = "C2")

# }

Run the code above in your browser using DataLab