KMforCSD is an R package containing the algorithm and the simulated data examples from the paper Kernel Machines for Current Status Data. The package also contains the artificially censored data from Section 6.2.
You can install the package from its GitHub repository. You first need to install the devtools package.
install.packages("devtools")
Then install KMforCSD using the install_github
function in the devtools package.
library(devtools)
install_github("Yael-Travis-Lumer/KMforCSD")
library(KMforCSD)
n=500 #size of dataset
data_list = weibull_data(n=500)
sim_data = data_list[[1]]
train_ind = sample(seq_len(n), size = 0.8*n)
train_data = sim_data[train_ind, ]
test_data = sim_data[-train_ind, ]
sol = KMforCSD(train_data)
pred = predict(sol, test_data) #prediction
decision_function = pred$response #estimated conditional expectation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.