Last data update: 2014.03.03

R: Plot the Weighted Mallows Cp
plot.wle.cpR Documentation

Plot the Weighted Mallows Cp

Description

Plot the weighted Mallows Cp based on weighted likelihood.

Usage

## S3 method for class 'wle.cp'
plot(x, base.line=0, num.max=20, 
           plot.it=TRUE, log.scale=FALSE, 
           xlab="Number of Predictors", ylab=NULL,
           verbose=FALSE, ...)

Arguments

x

an object of class wle.cp.

base.line

the intercept of the line to split the submodels in acceptable (good) and not-acceptable (bad), (the slope is always one).

num.max

maximum number of submodels plotted.

plot.it

if TRUE the graph is plotted.

log.scale

if TRUE the y-axis as log10 scale.

xlab

a title for the x axis.

ylab

a title for the y axis.

verbose

if TRUE warnings are printed.

...

graphical parameters can be given as arguments.

Value

num.good

number of submodels below the base.line

num.bad

number of submodels above the base.line

wcp.good

list of the submodels below the base.line with their WCp.

wcp.bad

list of the submodels above the base.line with their WCp.

Author(s)

Claudio Agostinelli

References

Agostinelli, C., (1999) Robust model selection in regression via weighted likelihood methodology, Working Paper n. 1999.4, Department of Statistics, Universiy of Padova.

Agostinelli, C., (1999) Robust model selection in regression via weighted likelihood methodology, submitted to Statistics & Probability Letters, revised december 1999.

Agostinelli, C., (1998) Inferenza statistica robusta basata sulla funzione di verosimiglianza pesata: alcuni sviluppi, Ph.D Thesis, Department of Statistics, University of Padova.

Agostinelli, C., (1998) Verosimiglianza pesata nel modello di regressione lineare, XXXIX Riunione scientifica della Societ'a Italiana di Statistica, Sorrento 1998.

See Also

wle.cp a function to calculate the Weighted Mallows Cp, wle.lm a function for estimating linear models with normal distribution error and normal kernel.

Examples

library(wle)
x.data <- c(runif(60,20,80),runif(5,73,78))
e.data <- rnorm(65,0,0.6)
y.data <- 8*log(x.data+1)+e.data
y.data[61:65] <- y.data[61:65]-4
z.data <- c(rep(0,60),rep(1,5))
plot(x.data, y.data, xlab="X", ylab="Y")
xx.data <- cbind(x.data, x.data^2, x.data^3, log(x.data+1))
result <- wle.cp(y.data~xx.data)
plot(result,num.max=15)

Results