elrPredict {EffectLiteR}R Documentation

Predict Conditional Effects

Description

Predicts conditional treatment effects based on a fitted EffectLiteR model.

Usage

elrPredict(obj, newdata = NULL, add.columns = "expected-outcomes")

Arguments

obj

Object of class effectlite.

newdata

An optional data.frame, containing the same continuous and categorical covariates as used when fitting the EffectLiteR model in obj. Only covariates (and neither the dependent variable nor indicators for latent variables) should be included.

add.columns

Used to request additional columns. Can be one or several of c("covariates", "modmat", "expected-outcomes", "prop-covariates").

Value

Object of class "data.frame".

Examples

m1 <- effectLite(y="dv", z=c("z1"), k=c("k1","kateg2"), x="x", 
control="control", data=example01)
newdata <- data.frame(k1="male", kateg2="1", z1=2)
elrPredict(m1, newdata)

[Package EffectLiteR version 0.4-6 Index]