gem_scd: A function to estimate the gradual effects model for an SCD

View source: R/gradual-effects-model.R

gem_scdR Documentation

A function to estimate the gradual effects model for an SCD

Description

A function to estimate the gradual effects model for an SCD

Usage

gem_scd(Trt, outcome, m, fam)

Arguments

Trt

A vector of treatment assignments where 0 = untreated and 1 = treated.

outcome

A vector of outcomes.

m

The number of treatment occasions to estimate a treatment effect for.

fam

A description of the error distribution and link function to be used in the model. This can be supplied in any way that 'glm' will accept. (See family for details of family functions.)

Value

'gem_scd' returns an object of class glm. In addition to the normal contents of a glm object, it also contains an estimate of 'omega' and a variance covariance matrix called 'varcov'.


SingleCaseES documentation built on Sept. 11, 2024, 7:04 p.m.