# pseudomean: Pseudo-observations for the restricted mean In pseudo: Computes Pseudo-Observations for Modeling

## Description

Computes pseudo-observations for modeling survival function based on the restricted mean.

## Usage

 `1` ```pseudomean(time,event, tmax) ```

## Arguments

 `time` the follow up time. `event` the status indicator: 0=alive, 1=dead. `tmax` the maximum cut-off point for the restricted mean. 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 restricted mean survival for each individual at prespecified time-points. 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.

Please note that the output of the function has changed and the usage is thus no longer the same as in the reference paper - the new usage is described in the example below.

## Value

A vector of pseudo-observations for each individual.

## References

Klein J.P., Gerster M., Andersen P.K., Tarima S., POHAR PERME, M.: "SAS and R Functions to Compute Pseudo-values for Censored Data Regression." Comput. methods programs biomed., 2008, 89 (3): 289-300

## See Also

`pseudosurv`, `pseudoci`

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21``` ```library(KMsurv) data(bmt) #compute the pseudo-observations: pseudo = pseudomean(time=bmt\$t2, event=bmt\$d3,tmax=2000) #arrange the data a <- cbind(bmt,pseudo = pseudo,id=1:nrow(bmt)) #fit a regression model for the mean time 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)       1154.99718 219.26127 223.114730 27.7484043 1.381621e-07
z1                 -11.55564   6.88759   7.067215  2.8148364 9.339642e-02
as.factor(z8)1    -518.60039 169.54383 172.840899  9.3562473 2.222267e-03
as.factor(group)2  630.54074 185.49115 187.292713 11.5552657 6.755765e-04
as.factor(group)3  143.50411 216.88341 220.748022  0.4378002 5.081861e-01

Scale Model:
Scale Link:                identity

Estimated Scale Parameters:
estimate   san.se   ajs.se     wald p
(Intercept) 636446.7 49205.89 52042.62 167.2977 0

Correlation Model:
Correlation Structure:     independence

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

mean       SD       Z   PVal
(Intercept)       1154.9972 223.1147  5.1767 0.0000
z1                 -11.5556   7.0672 -1.6351 0.1020
as.factor(z8)1    -518.6004 172.8409 -3.0004 0.0027
as.factor(group)2  630.5407 187.2927  3.3666 0.0008
as.factor(group)3  143.5041 220.7480  0.6501 0.5156
```

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