est_eqn: Estimating Equations for 'rpsftm()'

View source: R/est_eqn.R

est_eqnR Documentation

Estimating Equations for rpsftm()

Description

Calculates the Estimating Equation to be solved in RPSFTM models

Usage

est_eqn(psi, data, formula, target = 0, test = "survdiff", autoswitch, ...)

Arguments

psi

the parameter that measures how more rapidly the lifetime is expended under treatment

data

the data set that contains the variables. Must contain columns named: time, censor_time,rx, arm. Optionally a column named: treat_modifier

formula

a formula object of covariates to adjust for: ~strata(A)+B*C

target

the value to subtract off from the z-statistic

test

the survival regression function to calculate the z-statistic: survdiff, coxph, survreg

autoswitch

a logical to autodetect cases of no switching. If TRUE, then if all observations in an arm have perfect compliance then recensoring is not applied in that arm. If FALSE the recensoring is applied regardless of perfect compliance.

...

arguments to supply to the test function.

Value

A scalar value of the estimating equation: the z-statistics from a test minus a target value

Author(s)

Simon Bond

See Also

untreated


rpsftm documentation built on May 29, 2024, 2:37 a.m.