makemod2: (Internal) Fit the second stage of the Peters-Belson with...

View source: R/makemod2.R

makemod2R Documentation

(Internal) Fit the second stage of the Peters-Belson with Prognostic Heterogeneity model.

Description

Given a first stage model fit only on the control group, fit a second stage model with formula.

Usage

makemod2(mod1, treatment, data, center = TRUE)

Arguments

mod1

First stage model fit

treatment

A vector of treatment statuses, should be all 0 or 1.

data

Data where variables in form live.

center

Default TRUE. Should the predicted values be centered in the second stage?

Details

resp - pred ~ pred | treatment == 1

Value

A list consisting of mod2, the second stage model, and pred, the predicted values from mod1.


josherrickson/epb documentation built on July 6, 2023, 9:12 p.m.