censNID {censNID} | R Documentation |
Uses AS 138
censNID(y, n, cy, ctyp = c("left", "right"))
y |
complete observations |
n |
sample size |
cy |
censor point |
ctyp |
either "left" or "right", default is "left" |
a list with the following components:
est |
matrix with mean and sd and their se |
covMat |
covariance matrix |
nobs |
number of complete observations |
itercount |
number of iterations |
ifault |
fault indicator. 0-converged. -1:convergence not obtained in default number of allowed iterations. -2:fewer than 2 complete obserations. -3:error with confined estimator initial values (should not occur in R version). -4:invalid specification for limits with confined observation. |
A. I. McLeod aimcleod@uwo.ca
M. S. Wolynetz (1979). Algorithm AS 138: Maximum Likelihood Estimation from Confined and Censored Normal Data. Journal of the Royal Statistical Society. Series C (Applied Statistics), Vol. 28, No. 2, pp. 185-195
#Test data z <- rep((-2):2, rep(3, 5)) cy <- -1.5 y <- z[z>= cy] censNID(y, length(z), cy) #Test left-censoring set.seed(32173217) n <- 100 z <- rnorm(n) cy <- -1 ind <- z > cy y <- z[ind] censNID(y, n, cy) #Test right-censoring set.seed(32173217) n <- 100 z <- rnorm(n) cy <- 1 ind <- z < cy y <- z[ind] censNID(y, n, cy, ctyp="right")