predict: Plot method

predictR Documentation

Plot method

Description

The method computes the predicted outcome for each group with standard errors and confidence intervals.

Usage


## S3 method for class 'tlse'
predict(object, interval=c("none","confidence"),
                       se.fit=FALSE, newdata=NULL, level=0.95,
                       vcov.=NULL, ...)

Arguments

object

Object of class tlse.

interval

If set to interval, it returns the predicted values along with the lower and upper bounds of the confidence interval.

se.fit

Shoud the function returns the standard error of the predicted values?

level

The confidence interval level if interval is set to confidence.

newdata

A data.frame of new data. It must include values for all covariates.

vcov.

An alternative function to compute the covariance matrix of the least squares estimates. The default vcov method for lm objects.

...

Additional argument to pass to the vcov. function.

Examples

data(simData)
mod <- setModel(Y~Z|~X1+X2, data=simData)
fit <- tlse(mod, seType="lm", vcov.=sandwich::vcovHC, type="HC")
pr <- predict(fit, interval="confidence")

causalTLSE documentation built on March 31, 2023, 3:07 p.m.