Fits a semiparametric proportional odds model: $$ logit(1-S_Z(t)) = log(G(t)) + \beta^T Z $$ where G(t) is increasing but otherwise unspecified. Model is fitted by maximising the modified partial likelihood. A goodness-of-fit test by considering the score functions is also computed by resampling methods.
prop.odds(
formula,
data = parent.frame(),
beta = NULL,
Nit = 20,
detail = 0,
start.time = 0,
max.time = NULL,
id = NULL,
n.sim = 500,
weighted.test = 0,
profile = 1,
sym = 0,
baselinevar = 1,
clusters = NULL,
max.clust = 1000,
weights = NULL
)
a formula object, with the response on the left of a '~' operator, and the terms on the right. The response must be a Event object as returned by the `Event' function.
a data.frame with the variables.
starting value for relative risk estimates
number of iterations for Newton-Raphson algorithm.
if 0 no details is printed during iterations, if 1 details are given.
start of observation period where estimates are computed.
end of observation period where estimates are computed. Estimates thus computed from [start.time, max.time]. This is very useful to obtain stable estimates, especially for the baseline. Default is max of data.
For timevarying covariates the variable must associate each record with the id of a subject.
number of simulations in resampling.
to compute a variance weighted version of the test-processes used for testing time-varying effects.
if profile is 1 then modified partial likelihood is used, profile=0 fits by simple estimating equation. The modified partial likelihood is recommended.
to use symmetrized second derivative in the case of the estimating equation approach (profile=0). This may improve the numerical performance.
set to 0 to omit calculations of baseline variance.
to compute cluster based standard errors.
number of maximum clusters to be used, to save time in iid decomposition.
weights for score equations.
returns an object of type 'cox.aalen'. With the following arguments:
cumulative timevarying regression coefficient estimates are computed within the estimation interval.
the martingale based pointwise variance estimates.
robust pointwise variances estimates.
estimate of proportional odds parameters of model.
variance for gamma.
robust variance for gamma.
list with residuals. Estimated martingale increments (dM) and corresponding time vector (time).
observed absolute value of supremum of cumulative components scaled with the variance.
p-value for covariate effects based on supremum test.
resampled supremum values.
observed absolute value of supremum of difference between observed cumulative process and estimate under null of constant effect.
p-value based on resampling.
resampled supremum values.
observed integrated squared differences between observed cumulative and estimate under null of constant effect.
p-value based on resampling.
resampled supremum values.
resampling based constant to construct robust 95% uniform confidence bands.
observed test-process of difference between observed cumulative process and estimate under null of constant effect over time.
modified partial likelihood, pseudo profile likelihood for regression parameters.
inverse of the derivative of the score function.
value of score for final estimates.
observed score process for proportional odds regression effects.
p-value based on resampling.
re-sampled supremum values.
list of 50 random realizations of test-processes for constant proportional odds under the model based on resampling.
The modelling formula uses the standard survival modelling given in the survival package.
For large data sets use the divide.conquer.timereg of the mets package to run the model on splits of the data, or the alternative estimator by the cox.aalen function.
The data for a subject is presented as multiple rows or "observations", each of which applies to an interval of observation (start, stop]. The program essentially assumes no ties, and if such are present a little random noise is added to break the ties.
Martinussen and Scheike, Dynamic Regression Models for Survival Data, Springer (2006).
# NOT RUN {
data(sTRACE)
# Fits Proportional odds model
out<-prop.odds(Event(time,status==9)~age+diabetes+chf+vf+sex,
sTRACE,max.time=7,n.sim=100)
summary(out)
par(mfrow=c(2,3))
plot(out,sim.ci=2)
plot(out,score=1)
pout <- predict(out,Z=c(70,0,0,0,0))
plot(pout)
### alternative estimator for large data sets
form <- Surv(time,status==9)~age+diabetes+chf+vf+sex
pform <- timereg.formula(form)
out2<-cox.aalen(pform,data=sTRACE,max.time=7,
propodds=1,n.sim=0,robust=0,detail=0,Nit=40)
summary(out2)
# }
Run the code above in your browser using DataLab