Description Usage Arguments Value Author(s) References See Also Examples
Uses AS 138
1 |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.