pbph: pbph: A package for performing Peters-Belson with Prognostic...

View source: R/pbph.R

pbphR Documentation

pbph: A package for performing Peters-Belson with Prognostic Heterogeneity

Description

Performs Peters-Belson with Prognostic Heterogeneity on the data.

Usage

pbph(mod1, treatment, data, center = TRUE, cluster = NULL)

Arguments

mod1

First stage fitted model.

treatment

A 0/1 variable in data indicating treatment assignment, or a vector of 0/1 treatment indicators.

data

Data where variables in form live.

center

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

cluster

A variable in data indicating cluster membership, or a vector of cluster membership.

Value

A pbph object which extends lm. Can be passed to summary or confint.

The return contains an additional object, pbph, which lm doesn't include. pbph contains mod1, a copy of the first stage model, and data, which includes the data augmented with treatment and predicted.


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