ParamSampleCens: Maximum Likelihood Estimator of parameters from a censored...

Description Usage Arguments Value Note Author(s) References Examples

View source: R/ParamSampleCens.R

Description

Computes maximum likelihood estimators of the canonical parameters for several distributions, based on a censored sample.

Usage

1
2
ParamSampleCens(censdata, dist = c("normal", "logistic", "gamma", "weibull")[1], 
     null.values = c(0, 1), conf.level = 0.95, initial = NULL)

Arguments

censdata

Dataframe that contains censored data, format as specified by code = interval2 in Surv.

dist

Assumed distribution of the sample.

null.values

Fixed values for hypothesis tests.

conf.level

Confidence level of confidence intervals.

initial

Initial values for the maximization.

Value

coeff

Estimators, standard errors, confidence intervals, and 2-sided p-values for the null hypothesis as given in null.values. All this inference is based on maximum likelihood theory, i.e. standard errors are computed using the inverse expected Hessian at the maximum likelihood estimator.

percent.cens

Percentage of censored observations.

loglik

Log likelihood function value at the estimator.

info.converg

Convergence information provided by the function optim.

info.converg.message

Message provided by the function optim.

Note

Functions with similar functionality are provided in the package fitdistrplus.

Author(s)

Stanislas Hubeaux, [email protected]

Kaspar Rufibach, [email protected]
http://www.kasparrufibach.ch

References

Hubeaux, S. (2013). Estimation from left- and/or interval-censored samples. Technical report, Biostatistics Oncology, F. Hoffmann-La Roche Ltd.

Lynn, H. S. (2001). Maximum likelihood inference for left-censored HIV RNA data. Stat. Med., 20, 33–45.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
n <- 500
prop.cens <- 0.35

## example with a left-censored Normally distributed sample
set.seed(2013)
mu <- 3.5
sigma <- 1
LOD <- qnorm(prop.cens, mean = mu, sd = sigma)
x1 <- rnorm(n, mean = mu, sd = sigma)
s1 <- censorContVar(x1, LLOD = LOD)
ParamSampleCens(censdata = s1)


## example with an interval-censored Normal sample
set.seed(2013)
x2 <- rnorm(n, mean = mu, sd = sigma)
LOD <- qnorm(prop.cens / 2, mean = mu, sd = sigma)
UOD <- qnorm(1 - prop.cens / 2, mean = mu, sd = sigma)
s2 <- censorContVar(x2, LLOD = LOD, ULOD = UOD)
ParamSampleCens(censdata = s2)


## Not run: 
## compare to fitdistrplus
library(fitdistrplus)
s2 <- as.data.frame(s2)
colnames(s2) <- c("left", "right")
summary(fitdistcens(censdata = s2, distr = "norm"))

## End(Not run)

SurvRegCensCov documentation built on May 30, 2017, 3:32 a.m.