Learn R Programming

linLIR (version 1.0-1)

s.linlir: Simple linear Likelihood-based Imprecise Regression

Description

Conducts a LIR analysis for 2 variables with interval-valued observations whose relation is assumed to be linear.

Usage

s.linlir(dat.idf, var = NULL, p = 0.5, bet, epsilon = 0, b.grid = 1000)

## S3 method for class 's.linlir':
print(x, ...)
## S3 method for class 's.linlir':
summary(object, ...)
## S3 method for class 's.linlir':
plot(x, y=NULL, ..., typ, para.typ = "polygon", b.range = c(-1e-05, 1e-05), b.grid = 1000, nb.func = 1000, seed.func = NULL, pl.lrm = TRUE, pl.band = FALSE, pl.dat = FALSE, 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 = " ", y.lab = " ")

Arguments

dat.idf
The idf-object to be analyzed.
var
Names of the two variables out of the idf-object to be analyzed.
p
Quantile of the abolute residuals' distribution to be used as loss function in the LIR analysis. (0.5 corresponds to the median.)
bet
Cutoff-point for the normalized profile likelihood function.
epsilon
Fraction of errors considered.
b.grid
Particular parameter of the internal function undom.para determining the undominated parameter combinations.
x
Argument of the generic functions plot and print. Here x is the s.linlir-object to be plotted or printed.
...
Argument of the generic functions plot, print and summary: Other parameters.
object
The s.linlir-object to be summarized.
y
Argument of the generic function plot. Here y=NULL.
typ
Type of the plot. Possible values are "para": plot undominated parameter set, "lrm": plot f.lrm, "func": plot undominated regression functions.
para.typ
Options for plot of typ="para" are "polygon" (default) or "points" (approximation).
b.range
Considered interval of slopes for plots of typ="para". If default is chosen, then x.lim ist taken as b.range.
nb.func
Number of (randomly chosen) plotted undominated lines for plots of typ="func".
seed.func
Set seed for the random selection of plotted regression lines for plots of typ="func". (Optional)
pl.lrm
Logical for plots of typ=c("para","func"). If pl.lrm=TRUE (default), f.lrm is highlighted in the plot.
pl.band
Logical for plots of typ="func". If pl.band=TRUE, the band around f.lrm is added to the plot.
pl.dat
Logical for plots of typ=c("lrm","func"). If pl.dat=TRUE, the data are plotted in the background of the plot.
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

  • f.lrmIntercept and slope of the Likelihood-based Region Minimax (LRM) line(s).
  • q.lrmValue of the p-quantile of the absolute residuals associated with the LRM line(s).
  • a.undomRange of intercept values of the undominated regression lines.
  • b.undomRange of slope values of the undominated regression lines.
  • undom.paraA matrix of undominated parameter combinations approximating the entire set of parameters corresponding to the set of undominated regression lines.
  • configA list containing information about the settings of the LIR analysis.
  • datAn nx4 data.frame containing the imprecise data of the analyzed variables. Columns 1 and 2 correspond to the interval-valued observations of the regressor variable, columns 3 and 4 to those of the dependent variable.
  • nNumber of observations.
  • callCall of the function s.linlir.

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/.)

See Also

idf.create, gen.lms, kl.ku, undom.para

Examples

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

test <- s.linlir(toy.idf, bet=0.5)
test

summary(test)

plot(test, typ="para", x.adj=0.7, y.las=1, y.adj=6, y.padj=-3)
plot(test, typ="func", pl.lrm=FALSE, x.adj=0.7, y.adj=0.7, y.padj=-3)
plot(test, typ="lrm", pl.dat=TRUE, pl.band=TRUE, k.x=10, k.y=10, y.las=1, y.adj=6)

Run the code above in your browser using DataLab