Learn R Programming

medflex (version 0.6-10)

plot.neLht: Confidence interval plots for linear hypotheses in natural effect models

Description

Confidence interval plots for linear hypotheses in natural effect models.

Usage

# S3 method for neEffdecomp
plot(x, level = 0.95, transf = identity, ylabels, yticks.at, ...)

# S3 method for neLht plot(x, level = 0.95, transf = identity, ylabels, yticks.at, ...)

# S3 method for neLhtBoot plot( x, level = 0.95, ci.type = "norm", transf = identity, ylabels, yticks.at, ... )

Arguments

x

an object of class neLht.

level

the confidence level required.

transf

transformation function to be applied internally on the (linear hypothesis) estimates and their confidence intervals (e.g. exp for logit or Poisson regression). The default is identity (i.e. no transformation).

ylabels

character vector containing the labels for the (linear hypothesis) estimates to be plotted on the y-axis.

yticks.at

numeric vector containing the y-coordinates (from 0 to 1) to draw the tick marks for the different estimates and their corresponding confidence intervals.

...

additional arguments.

ci.type

the type of bootstrap intervals required (see type argument in neModel-methods).

Details

This function is an adapted version of plot.glht from the multcomp package and yields confidence interval plots for each of the linear hypothesis parameters.

See Also

neModel, neLht, neEffdecomp

Examples

Run this code
data(UPBdata)

impData <- neImpute(UPB ~ att * negaff + gender + educ + age, 
                    family = binomial, data = UPBdata)
neMod <- neModel(UPB ~ att0 * att1 + gender + educ + age, 
                 family = binomial, expData = impData, se = "robust")

lht <- neLht(neMod, linfct = c("att0 = 0", "att0 + att0:att1 = 0", 
                               "att1 = 0", "att1 + att0:att1 = 0", 
                               "att0 + att1 + att0:att1 = 0"))

## all pairs return identical output
plot(confint(lht), transf = exp)
plot(lht, transf = exp)

plot(neEffdecomp(neMod), transf = exp)
plot(neMod, transf = exp)

# \dontshow{
  plot(neEffdecomp(neMod), level = 0.8, transf = exp, ylabels = c("PDE", "TDE", "PIE", "TIE", "TE"), yticks.at = c(0, 0.1, 0.5, 0.6, 1))
  plot(neMod, level = 0.8, transf = exp, ylabels = c("PDE", "TDE", "PIE", "TIE", "TE"), yticks.at = c(0, 0.1, 0.5, 0.6, 1))
  
  lht <- neLht(neMod, linfct = c("att0 = 0"))
  summary(lht)
  lht <- neLht(neMod, linfct = c("att0 = 0", "att0 + att0:att1 = 2"))
  summary(lht)
# }

Run the code above in your browser using DataLab