ParamSampleCens {SurvRegCensCov} | R Documentation |
Maximum Likelihood Estimator of parameters from a censored sample
Description
Computes maximum likelihood estimators of the canonical parameters for several distributions, based on a censored sample.
Usage
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 |
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 |
percent.cens |
Percentage of censored observations. |
loglik |
Log likelihood function value at the estimator. |
info.converg |
Convergence information provided by the function |
info.converg.message |
Message provided by the function |
Note
Functions with similar functionality are provided in the package fitdistrplus.
Author(s)
Stanislas Hubeaux, stan.hubeaux@bluewin.ch
Kaspar Rufibach, kaspar.rufibach@gmail.com
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
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)