View source: R/intData_class.r
| intData | R Documentation |
Constructs an interval data object.
intData(
macrodata,
Seq = c("AllLb_AllUb", "AllCen_AllRng", "LbUb_VarbyVar", "CenRng_VarbyVar"),
LatentParam = NULL,
LatentCase = c("U_id_symmetric", "U_id", "General"),
LatentDist = c("Unif", "Triang", "TNorm", "InvTri", "Beta", "KDE", "Degenerated"),
TriangParam = 0,
BetaParam.a = 1,
BetaParam.b = 1,
Umicro = NULL,
estimate.DistParam = FALSE,
VarNames = NULL,
ObsNames = row.names(macrodata),
NbMicroUnits = integer(0)
)
macrodata |
A data frame or matrix containing the macrodata. |
Seq |
Format of macrodata if it is a data frame or matrix. Available options are:
|
LatentParam |
A list with the parameters of the latent variables.
Expects a list with a single number if
|
LatentCase |
A string specifying which of the three scenarios applies to the latent variables:
Defaults to |
LatentDist |
A string or vector of strings specifying the distribution(s) of the latent variables. If the variables are identically distributed it can be one of ( |
TriangParam |
Mode of the triangular distribution. If the latent variables are identically distributed, it is only necessary to provide a number, if not a vector is needed.
The default is |
BetaParam.a |
Parameter alpha of the Beta distribution. If the latent variables are identically distributed, it is only necessary to provide a number, if not a vector is needed.
The default is |
BetaParam.b |
Parameter beta of the Beta distribution. If the latent variables are identically distributed, it is only necessary to provide a number, if not a vector is needed.
The default is |
Umicro |
Latent microdata observations.
Needed if |
estimate.DistParam |
Logical parameter indicating if estimation of the parameters of the latent distributions should be performed in the case of triangular or Beta distributions.
Can only be set to TRUE if |
VarNames |
A character vector of variable names. |
ObsNames |
A character vector of observation names. |
NbMicroUnits |
An integer vector indicating the number of individual observations (microdata) aggregated by interval (macrodata). |
An object of class intData.
Oliveira, M. R., Pinheiro, D., & Oliveira, L. (2025). Location and association measures for interval-valued data based on Mallows' distance. arXiv preprint arXiv:2407.05105. https://arxiv.org/abs/2407.05105
Adapted from package MAINT.Data (https://cran.r-project.org/package=MAINT.Data).
# Load microdat and macrodata
data(creditcard)
CreditCard_microdata <- creditcard$microdata
CreditCard_min_max <- creditcard$min_max
# Create an intData object using the min_max component of the dataset
# Assume a continuous uniform distribution for the latent variables
# This corresponds to LatentCase="U_id_symmetric"
# This is the default setting for the intData class
credit_card_int_unif <- intData(CreditCard_min_max,
Seq = "LbUb_VarbyVar",
VarNames = colnames(CreditCard_microdata)[3:7])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.