cloudceiling: Cloud ceiling height

CloudCeilingR Documentation

Cloud ceiling height

Description

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.

Usage

data(CloudCeiling)

Format

This data frame contains the following columns:

y

Logarithm of the cloud ceiling heights.

cc

Right censoring indicator (1 if the observation is right-censored and 0 otherwise).

Source

\insertRef

park2007censoredARCensReg

See Also

ARCensReg, ARtCensReg

Examples

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)

ARCensReg documentation built on Aug. 30, 2023, 1:09 a.m.