Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

positive

Class "positive-continuous" and Inherited Classes


Description

The positive-continuous class inherits from the continuous-class and is the parent of the proportion class. In both cases, no observations can be zero, and in the case of the proportion class, no observations can be one. The nonnegative-continuous-class and the SC_proportion-class are appropriate for those situations. Aside from these facts, the rest of the documentation here is primarily directed toward developeRs.

Objects from the Classes

Objects can be created that are of positive-continuous or proportion class via the missing_variable generic function by specifying type = "positive-continuous" or type = "proportion"

Slots

The default transformation for the positive-continuous class is the log function. The proportion class inherits from the positive-continuous class and has the identity transformation and the binomial family as defaults, in which case the fit_model-methods call the betareg function in the betareg package. Alternatively, the transformation could be an inverse CDF like the qnorm function and the family could be gaussian, in which case the fit_model-methods call the bayesglm function in the arm package.

Author(s)

Ben Goodrich and Jonathan Kropko, for this version, based on earlier versions written by Yu-Sung Su, Masanao Yajima, Maria Grazia Pittau, Jennifer Hill, and Andrew Gelman.

See Also

Examples

# STEP 0: GET DATA
data(CHAIN, package = "mi")

# STEP 0.5 CREATE A missing_variable (you never need to actually do this)
healthy <- missing_variable(CHAIN$healthy / 100, type = "proportion")
show(healthy)

mi

Missing Data Imputation and Model Checking

v1.0
GPL (>= 2)
Authors
Andrew Gelman [ctb], Jennifer Hill [ctb], Yu-Sung Su [aut], Masanao Yajima [ctb], Maria Pittau [ctb], Ben Goodrich [cre, aut], Yajuan Si [ctb], Jon Kropko [aut]
Initial release
2015-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.