Learn R Programming

MAINT.Data (version 2.8.0)

IData: Interval Data objects

Description

IData creates IData objects from data frames of interval bounds or MidPoint/LogRange values of the interval-valued observations.

Usage

IData(Data, trnsf = c("RngLog","AllLogit"),
Seq = c("LbUb_VarbyVar", "MidPLogR_VarbyVar", "AllLb_AllUb", "AllMidP_AllLogR"), 
VarNames=NULL, ObsNames=row.names(Data), NbMicroUnits=integer(0))

Arguments

Data

A data frame or matrix of interval bounds or MidPoint/LogRange values.

trnsf

The data transformation to be applied to the interval ranges and (possibly) the MidPoints. Alternatives are:
“RngLog” The MidPoints are left unchanged and a log tranformation is applied to the ranges.
“AllLogit” A logit transformation is applied to both the MidPoints and the ranges. This option is particularly usefull for dara restricted to the (0,1) domain.

Seq

The format of ‘Data’ data frame. Available options are:
“LbUb_VarbyVar”: Lower bounds followed by upper bounds, variable by variable.
“MidPLogR_VarbyVar”: MidPoints followed by LogRanges, variable by variable.
“AllLb_AllUb”: All lower bounds followed by all upper bounds, in the same variable order.
“AllMidP_AllLogR”: All MidPoints followed all LogRanges, in the same variable order.

VarNames

An optional vector of names to be assigned to the Interval-Valued Variables.

ObsNames

An optional vector of names assigned to the individual observations.

NbMicroUnits

An integer vector with the number of micro data units by interval-valued observation (or an empty vector, if not applicable)

Details

Objects of class IData describe a data set of ‘NObs’ observations on ‘NIVar’ Interval-valued variables. This function creates an interval-data object from a data-frame with either the lower and upper bounds of the observed intervals or by their midpoints and log-ranges.

See Also

IData, AgrMcDt

Examples

Run this code
ChinaT <- IData(ChinaTemp[1:8],VarNames=c("T1","T2","T3","T4"))
cat("Summary of the ChinaT IData object:\n")  ; print(summary(ChinaT))
cat("ChinaT first ant last three observations:\n")  
print(head(ChinaT,n=3))
cat("\n...\n")
print(tail(ChinaT,n=3))

Run the code above in your browser using DataLab