rpsftm {rpsftm}R Documentation

Rank Preserving Structural Failure Time Model

Description

Main Function used for estimating causal parameters under the Rank Preserving Structural Failure Time Model

Usage

rpsftm(
  formula,
  data,
  censor_time,
  subset,
  na.action,
  test = survdiff,
  low_psi = -1,
  hi_psi = 1,
  alpha = 0.05,
  treat_modifier = 1,
  autoswitch = TRUE,
  n_eval_z = 100,
  ...
)

Arguments

formula

a formula with a minimal structure of Surv(time, status)~rand(arm,rx). Further terms can be added to the right hand side to adjust for covariates and use strata or cluster arguments.

data

an optional data frame that contains variables

censor_time

variable or constant giving the time at which censoring would, or has occurred. This should be provided for all observations unlike standard Kaplan-Meier or Cox regression where it is only given for censored observations. If no value is given then re-censoring is not applied.

subset

expression indicating which subset of the rows of data should be used in the fit. This can be a logical vector (which is replicated to have length equal to the number of observations), a numeric vector indicating which observation numbers are to be included (or excluded if negative), or a character vector of row names to be included. All observations are included by default.

na.action

a missing-data filter function. This is applied to the model.frame after any subset argument has been used. Default is options()$na.action.

test

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

low_psi

the lower limit of the range to search for the causal parameter

hi_psi

the upper limit of the range to search for the causal parameter

alpha

the significance level used to calculate confidence intervals

treat_modifier

an optional variable that psi is multiplied by on an individual observation level to give differing impact to treatment.

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.

n_eval_z

The number of points between hi_psi and low_psi at which to evaluate the Z-statistics in the estimating equation. Default is 100.

...

arguments to supply to the test function.

Details

the formula object Surv(time, status)~rand(arm,rx). rand() stands for randomisation, both the randomly assigned and actual observed treatment.

Further adjustment terms can be added on the right hand side of the formula if desired, included strata() or cluster() terms.

Value

a rpsftm method object that is a list of the following:

Author(s)

Simon Bond

See Also

survdiff, coxph.object, survreg.object

Examples

?immdef
fit <- rpsftm(Surv(progyrs, prog)~rand(imm,1-xoyrs/progyrs),immdef, censyrs)
print(fit)
summary(fit)
plot(fit)


[Package rpsftm version 1.2.9 Index]