# plot.wle.lm: Plots for the Linear Model In wle: Weighted Likelihood Estimation

## Description

The `plot.wle.lm` function plots a separate graph windows for each root. In each windows four plots are printed: residuals vs fitted, normal qq plot of the residuals, weighted residuals vs weighted fitted, normal qq plot of the weighted residuals. A summary plot is also printed: in the diagonal, the value of the weigths vs position of the observations for each root; in the upper diagonal residuals vs residuals of two different roots; in the lower diagonal weights vs weights of two different roots. The roots and the graphs can be chosen by the arguments `roots`, `which.main` and `which`.

## Usage

 ```1 2 3 4``` ```## S3 method for class 'wle.lm' plot(x, roots, which=1:4, which.main, level.weight=0.5, ask = dev.interactive(), col=c(2, 1, 3), id.n=3, labels.id, cex.id = 0.75, verbose=FALSE, ...) ```

## Arguments

 `x` an object of class `wle.lm`. `roots` a vector specify for which roots the plots are required. `which` if a subset of the plots for each root is required, specify a subset of the numbers `0:4`, 0 means no plots. `which.main` if a subset of the plots for the main graphic is required, specify a subset of the numbers `0:roots^2`, 0 means no plots. The plots are specified by columns. `level.weight` value of the weight under which an observations is marked with different color. `ask` logical; if `TRUE`, the user is asked before each plot, see `par(ask=.)`. `col` a vector of 3 elements, to specify colors for the plots. `id.n` number of points to be labelled in some plots, starting with the ones with less weight. `labels.id` vector of labels, from which the labels for less weighted points will be chosen. If missing uses observation numbers. `cex.id` magnification of point labels. `verbose` if `TRUE` warnings are printed. `...` graphical parameters can be given as arguments.

## Author(s)

Claudio Agostinelli

`wle.lm` a function for estimating linear models with normal distribution error and normal kernel.
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24``` ```library(wle) data(artificial) result <- wle.lm(y~x1+x2+x3, data=artificial, boot=40, group=6, num.sol=2) result plot(result) # all plots, default behavior plot(result, roots=1) # only first root, one plot for window par(mfcol=c(2,2)) plot(result, roots=1) # only first root, as usual plot(result, roots=2, which=1, which.main=0) # only second root, only residual vs fitted values plot plot(result, which=1) # main plot + residual vs fitted values plot for each root par(mfcol=c(3,2)) plot(result, which=1) # main plot + residual vs fitted values plot for each root all in the same window ```