est_eqn function

Estimating Equations for rpsftm()

Estimating Equations for rpsftm()

Calculates the Estimating Equation to be solved in RPSFTM models

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.

Returns

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

See Also

untreated

Author(s)

Simon Bond

  • Maintainer: Simon Bond
  • License: GPL-2
  • Last published: 2024-03-12

Useful links