SimDataDist-class {simsem} | R Documentation |
Class "SimDataDist"
: Data distribution object
Description
This class will provide the distribution of a dataset.
Objects from the Class
Objects can be created by bindDist
function. It can also be called from the form new("SimDataDist", ...)
.
Slots
p
:Number of variables
margins
:A character vector specifying all the marginal distributions
paramMargins
:A list whose each component is a list of named components, giving the parameter values of the marginal distributions.
keepScale
:Transform back to retain the mean and standard deviation of a variable equal to the model implied mean and standard deviation (with sampling error)
reverse
:To mirror each variable or not. If
TRUE
, reverse the distribution of a variable (e.g., from positive skewed to negative skewed).copula
:The multivariate copula template for data generation. See
bindDist
skewness
:The target skewness values of each variable
kurtosis
:The target (excessive) kurtosis values of each variable
Methods
summaryTo summarize the object
plotDistTo plot a density distribution (for one variable) or a contour plot (for two variables).
Author(s)
Sunthud Pornprasertmanit (psunthud@gmail.com)
See Also
-
bindDist
The constructor of this class.
Examples
showClass("SimDataDist")
d1 <- list(df=2)
d2 <- list(df=3)
d3 <- list(df=4)
d4 <- list(df=5)
d5 <- list(df=3)
d6 <- list(df=4)
d7 <- list(df=5)
d8 <- list(df=6)
dist <- bindDist(c(rep("t", 4), rep("chisq", 8)), d1, d2, d3, d4, d5, d6, d7, d8, d5, d6, d7, d8)
summary(dist)
dist2 <- bindDist(skewness = seq(-3, 3, length.out=12), kurtosis = seq(2, 5, length.out=12))
summary(dist2)