Learn R Programming

qgcompint (version 1.0.2)

getstrateffects: Calculate mixture effect at a set value of effect measure modifier

Description

A standard qgcomp fit with effect measure modification only estimates effects at the referent (0) level of the modifier (psi1). This function can be used to estimate effects at arbitrary levels of the modifier

Usage

getstrateffects(x, emmval = 1, ...)

Value

An object of class "qgcompemmeffects", which inherits from "qgcompemmfit" and "list"

This class contains the emmval-stratum specific effect estimates of the mixture. By default, this prints a coefficient table, similar to objects of type "qgcompemmfit" which displays the stratum specific joint effects from a "qgcompemmfit" model.

Arguments

x

"qgcompemmfit" object from qgcomp.emm.glm.noboot function

emmval

numerical: value of effect measure modifier at which weights are generated

...

unused

See Also

qgcomp.emm.glm.noboot getstratweights

Examples

Run this code
dat <- data.frame(y=runif(50), x1=runif(50), x2=runif(50),
  z=rbinom(50, 1, 0.5), r=rbinom(50, 1, 0.5))
(qfit <- qgcomp.emm.glm.noboot(f=y ~ z + x1 + x2, emmvar="z",
  expnms = c('x1', 'x2'), data=dat, q=2, family=gaussian()))
getstrateffects(qfit, emmval = 0)
strateffects = getstrateffects(qfit, emmval = 1)

Run the code above in your browser using DataLab