observed_outcome: Calculate the Average Outcome for Those in Optimal and...

Description Usage Arguments Value Examples

View source: R/methods.R

Description

This function claculates the average outcome for cases assigned to their optimal and nonoptimal treatment. If bootstrapping was performed, confidence intervals based on the bootstrap. This is done by calculating the optimal treatment based on predicted PAI scores from each bootstrap replication, and using these to select cases and calculate the average (observed) outcome.

Usage

1

Arguments

object

an mipai or mibootpai class object returned from mi_lm_pai_cvboot.

Value

A data frame with summary statistics.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
# builtin dataset with 32 cases
dat <- mtcars
dat$cyl <- factor(dat$cyl)

m <- mi_lm_pai_cvboot(~ cyl + am * (mpg + hp + drat + wt),
  "disp", "am", list(dat, dat),
  nboot = 50, holdouts = "10", cores = 2)

observed_outcome(m)

## End(Not run)

JWiley/pai documentation built on May 7, 2019, 10:15 a.m.