Learn R Programming

survival (version 3.8-6)

yates: Population prediction

Description

Compute population marginal means (PMM) from a model fit, for a chosen population and statistic.

Usage

yates(fit, term, population = c("data", "factorial", "sas"),
levels, test = c("global", "trend", "pairwise"), predict = "linear",
options, nsim = 200, method = c("direct", "sgtt"))

Arguments

Value

an object of class yates with components of

estimate

a data frame with one row for each level of the term, and columns containing the level, the mean population predicted value (mppv) and its standard deviation.

tests

a matrix giving the test statistics

mvar

the full variance-covariance matrix of the mppv values

summary

optional: any further summary if the values provided by the prediction method.

Details

The many options and details of this function are best described in a vignette on population prediction.

Examples

Run this code
fit1 <- lm(skips ~ Solder*Opening + Mask, data = solder)
yates(fit1, ~Opening, population = "factorial")

fit2 <- coxph(Surv(time, status) ~ factor(ph.ecog)*sex + age, lung)
yates(fit2, ~ ph.ecog, predict="risk")  # hazard ratio

Run the code above in your browser using DataLab