Description Usage Arguments Details Value References See Also Examples
The function ComputeSMLE computes the Smoothed Maximum Likelihood Estimator of the distribution function under current status data.
1 | ComputeSMLE(data, x, bw)
|
data |
Dataframe with three variables:
|
x |
numeric vector containing the points where the confidence intervals are computed. |
bw |
numeric vector of size |
In the current status model, the variable of interest X with distribution function F is not observed directly.
A censoring variable T is observed instead together with the indicator Δ = (X ≤ T).
ComputeSMLE computes the SMLE of F based on a sample of size n <- sum(data$freq2)
.
The bandwidth parameter vector that minimizes the pointwise Mean Squared Error using the subsampling principle in combination with undersmoothing is returned by the function ComputeBW.
SMLE(x) Smoothed Maximum Likelihood Estimator. This is a vector of size length(x)
containing the values of the SMLE for each point in the vector x.
Groeneboom, P. and Hendrickx, K. (2017). The nonparametric bootstrap for the current status model. Electronic Journal of Statistics 11(2):3446-3848.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(Rcpp)
library(curstatCI)
# sample size
n <- 1000
# Uniform data U(0,2)
set.seed(2)
y <- runif(n,0,2)
t <- runif(n,0,2)
delta <- as.numeric(y <= t)
A<-cbind(t[order(t)], delta[order(t)], rep(1,n))
grid <-seq(0,2 ,by = 0.01)
# bandwidth vector
h<-rep(2*n^-0.2,length(grid))
smle <-ComputeSMLE(A,grid,h)
plot(grid, smle,type ='l', ylim=c(0,1), main= "",ylab="",xlab="",las=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.