Description Usage Arguments Value Author(s) References Examples

This function is used to fit linear models considering Laplace errors.

1 2 |

`formula` |
an object of class |

`data` |
an optional data frame containing the variables in the model. If
not found in |

`method` |
character string specifying the algorithm to use. The default
algorithm is the Barrodale and Roberts algorithm |

`subset` |
an optional expression indicating the subset of the rows of data that should be used in the fit. |

`na.action` |
a function that indicates what should happen when the data contain NAs. |

`control` |
a list of control values for the estimation algorithm to replace
the default values returned by the function |

`model, x, y` |
logicals. If |

`contrasts` |
an optional list. See the |

an object of class `lad`

representing the linear model fit. Generic
function `print`

, show the results of the fit.

The functions `print`

and `summary`

are used to obtain and print a summary
of the results. The generic accessor functions `coefficients`

, `fitted.values`

and `residuals`

extract various useful features of the value returned by `lad`

.

The design was inspired by the R function `lm`

.

Barrodale, I., and Roberts, F.D.K. (1974).
Solution of an overdetermined system of equations in the L1 norm.
*Communications of the ACM* **17**, 319-320.

Phillips, R.F. (2002).
Least absolute deviations estimation via the EM algorithm.
*Statistics and Computing* **12**, 281-285.

1 2 | ```
fm <- lad(stack.loss ~ ., data = stackloss, method = "BR")
summary(fm)
``` |

```
Call:
lad(formula = stack.loss ~ ., data = stackloss, method = "BR")
Residuals:
Min 1Q Median 3Q Max
-9.4812 -1.2174 0.0000 0.5275 7.6348
Coefficients:
Estimate Std.Error Z value p-value
(Intercept) -39.6899 2.5935 -15.3034 0.0000
Air.Flow 0.8319 0.0294 28.2941 0.0000
Water.Temp 0.5739 0.0802 7.1529 0.0000
Acid.Conc. -0.0609 0.0341 -1.7864 0.0740
Degrees of freedom: 21 total; 17 residual
Scale estimate: 2.833893
Log-likelihood: -50.15272 on 5 degrees of freedom
```

L1pack documentation built on Nov. 17, 2017, 6:42 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.