censNID: mle NID sample with single censor point

Description Usage Arguments Value Author(s) References See Also Examples

Description

Uses AS 138

Usage

1
censNID(y, n, cy, ctyp = c("left", "right"))

Arguments

y

complete observations

n

sample size

cy

censor point

ctyp

either "left" or "right", default is "left"

Value

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.

Author(s)

A. I. McLeod aimcleod@uwo.ca

References

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

See Also

cenNID

Examples

 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")

censNID documentation built on May 2, 2019, 6:11 a.m.

Related to censNID in censNID...