pseudoyl: Pseudo-observations for the expected number of years lost

Description Usage Arguments Details Value References See Also Examples

Description

Computes pseudo-observations for modeling using the number of years lost.

Usage

1
pseudoyl(time,event, tmax)

Arguments

time

the follow up time.

event

the cause indicator, use 0 as censoring code and integers to name the other causes.

tmax

the maximum cut-off point time = the upper limit of the integral of the cumulative incidence function. If missing or larger than the maximum follow up time, it is replaced by the maximum follow up time.

Details

The function calculates the pseudo-observations for the expected number of years lost for each individual. The pseudo-observations can be used for fitting a regression model with a generalized estimating equation. No missing values in either time or event vector are allowed.

Value

A list containing the following objects:

cause

The ordered codes for different causes.

pseudo

A list of vectors- a vector for each of the causes, ordered by codes. Each value of a vector belongs to one individual (ordered as in the original data set).

References

Andersen P.K.: "A note on the decomposition of number of life years lost according to causes of death." Research report, Department of Biostatistics, University of Copenhagen, 2012 (2)

See Also

pseudoci, pseudomean, pseudosurv

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(KMsurv)
data(bmt)
bmt$icr <- bmt$d1 +  bmt$d3


#compute the pseudo-observations:
pseudo = pseudoyl(time=bmt$t2, event=bmt$icr,tmax=2000)

#arrange the data - use pseudo observations for cause 2
a <- cbind(bmt,pseudo = pseudo$pseudo[[2]],id=1:nrow(bmt))

#fit a regression model for cause 2

library(geepack)
summary(fit <- geese(pseudo ~ z1 + as.factor(z8) + as.factor(group),
	data = a, id=id, jack = TRUE, family=gaussian, 
	corstr="independence", scale.fix=FALSE))


#rearrange the output
round(cbind(mean = fit$beta,SD = sqrt(diag(fit$vbeta.ajs)),
	Z = fit$beta/sqrt(diag(fit$vbeta.ajs)),	PVal =
	2-2*pnorm(abs(fit$beta/sqrt(diag(fit$vbeta.ajs))))),4)

Example output

Loading required package: KMsurv
Loading required package: geepack

Call:
geese(formula = pseudo ~ z1 + as.factor(z8) + as.factor(group), 
    id = id, data = a, family = gaussian, scale.fix = FALSE, 
    corstr = "independence", jack = TRUE)

Mean Model:
 Mean Link:                 identity 
 Variance to Mean Relation: gaussian 

 Coefficients:
                    estimate     san.se     ajs.se       wald            p
(Intercept)        879.34078 219.365201 223.196421 16.0686341 6.108751e-05
z1                  10.10276   6.904353   7.083291  2.1410852 1.434004e-01
as.factor(z8)1     496.34909 171.529255 174.862683  8.3733271 3.807679e-03
as.factor(group)2 -673.50096 184.882614 186.715577 13.2704084 2.696285e-04
as.factor(group)3 -119.96162 218.358110 222.249313  0.3018186 5.827446e-01

Scale Model:
 Scale Link:                identity 

 Estimated Scale Parameters:
            estimate   san.se   ajs.se     wald p
(Intercept)   636758 49853.98 52685.27 163.1357 0

Correlation Model:
 Correlation Structure:     independence 

Returned Error Value:    0 
Number of clusters:   137   Maximum cluster size: 1 

                       mean       SD       Z   PVal
(Intercept)        879.3408 223.1964  3.9398 0.0001
z1                  10.1028   7.0833  1.4263 0.1538
as.factor(z8)1     496.3491 174.8627  2.8385 0.0045
as.factor(group)2 -673.5010 186.7156 -3.6071 0.0003
as.factor(group)3 -119.9616 222.2493 -0.5398 0.5894

pseudo documentation built on May 1, 2019, 6:35 p.m.

Related to pseudoyl in pseudo...