Learn R Programming

linLIR (version 1.0-1)

idf: Interval data frame

Description

Create an interval data frame (idf-object), summarize its content and visualize subsets of two variables.

Usage

idf.create(dat, var.labels = NULL)

## S3 method for class 'idf':
summary(object, ...)
## S3 method for class 'idf':
plot(x, y=NULL, ..., var = NULL, k.x = 1, k.y = 1,p.cex = 1, x.adj = 0.5, x.padj = 3, y.las = 0, y.adj = 1, y.padj = 0, x.lim = c(0, 0), y.lim = c(0, 0), x.lab = "X", y.lab = "Y")

Arguments

dat
A data.frame containing 2 neighboring columns for each variable, the first column for the left endpoints of the interval observations, the second for the right endpoints.
var.labels
Names of the variables corresponding to the interval-valued observations in the data.frame.
object
The idf-object to be summarized.
...
Argument of the generic functions plot and summary: Other parameters.
x
Argument of the generic function plot. Here x is the idf-object to be plotted.
y
Argument of the generic function plot. Here y=NULL.
var
Names of the two variables out of the idf-object to be plotted. (Optional)
k.x
Particular plot function parameter. 1/k.x is the step width along the abscissa.
k.y
Particular plot function parameter. 1/k.y is the step width along the ordinate.
p.cex
Particular plot function parameter. p.cex is the point size to fill the rectangles with grey color.
x.adj
Horizontal position of the text for the abscissa.
x.padj
Vertical position of the text for the abscissa.
y.las
Orientation of the text for the ordinate. y.las=1 will turn the axis labels and the text in reading direction.
y.adj
y.adj regulates the position of the text for the ordinate in reading direction, i.e. if y.las=0 it sets the vertical position and if y.las=1 the horizontal position.
y.padj
y.padj regulates the position of the text for the ordinate orthogonal to the reading direction, i.e. if y.las=0 it sets the horizontal position and if y.las=1 the vertical position.
x.lim
The limits for the abscissa of the plot.
y.lim
The limits for the ordinate of the plot.
x.lab
Title of the abscissa.
y.lab
Title of the ordinate.

Value

  • An idf-object of m variables, which is a list of m+1 entries.
  • Var1 ... varmm different data.frames with 2 columns each, one for each of the 1st to mth variables.
  • nNumber of observations.

Details

Within the LIR framework all types of interval data are possible, including the particular cases of actually precise data (i.e. lower endpoint = upper endpoint) or missing data (i.e., in case of a real valued variable, lower endpoint = -Inf and upper endpoint = Inf). For the LIR analysis it makes no difference if the intervals are closed or not, therefore, the created idf-object does not contain this information.

References

A. Wiencierz, M. Cattaneo (2012). An exact algorithm for Likelihood-based Imprecise Regression in the case of simple linear regression with interval data. (Accepted for the 6th International Conference on Soft Methods in Probability and Statistics (SMPS 2012). Publication in the series Advances in Intelligent and Soft Computing. Springer-Verlag.) M. Cattaneo, A. Wiencierz (2012). Likelihood-based Imprecise Regression. (Accepted for publication in the International Journal of Approximate Reasoning. A preliminary version of the paper is available as a research report at: http://epub.ub.uni-muenchen.de/12450/.)

Examples

Run this code
data('toy.smps')
toy.idf <- idf.create(toy.smps, var.labels=c("x","y"))

summary(toy.idf)

plot(toy.idf, k.x=10, k.y=10, p.cex=1.5, y.las=1, y.adj=6) 
plot(toy.idf, k.x=10, k.y=10, x.adj=0.7, y.las=1, y.adj=6, y.padj=-3)
plot(toy.idf, k.x=10, k.y=10, x.adj=0.7, x.padj=4, y.adj=0.7, y.padj=-4)

Run the code above in your browser using DataLab