| CloudCeiling | R Documentation | 
The cloud ceiling heights, collected by the National Center for Atmospheric Research (NCAR), were observed hourly in San Francisco during March 1989, consisting of n=716 observations \insertCitepark2007censoredARCensReg.
data(CloudCeiling)
This data frame contains the following columns:
yLogarithm of the cloud ceiling heights.
ccRight censoring indicator (1 if the observation is right-censored and 0 otherwise).
park2007censoredARCensReg
ARCensReg, ARtCensReg
library(ggplot2)
data(CloudCeiling)
ggplot(CloudCeiling) + geom_line(aes(x=1:length(y), y=y)) + 
  labs(x="Time") + theme_bw()
# Proportion of censoring
prop.table(table(CloudCeiling$cc))
## Not run: 
# A censored regression model
## This may take a long time due to the number of censored observations.
## For other examples see help(ARCensReg).
x   = as.matrix(rep(1, length(CloudCeiling$y)))
cc  = CloudCeiling$cc
lcl = CloudCeiling$y
ucl = rep(Inf, length(CloudCeiling$y))
miss =  which(is.na(CloudCeiling$y))
cc[miss]  = 1
lcl[miss] = -Inf
AR_reg = ARCensReg(cc, lcl, ucl, CloudCeiling$y, x, p=1, tol=.001)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.