Documents and Tips
Plotting Guide
Description
The links below will take you to the corresponding R files. They contain very useful information.
Did you know there are nine different ways to calculate quantiles in R? The default method is not even the recommended method!
Please take a look at them if you get hung up on something.
Documents
- Read the whole document, do not skim this article. It is relatively short and has very useful information.
- Contains 'Common Bivariate Trellis Plots'
- Describes in more detail more arguments that you can use
- Explains about the 'key' used in each example
- Lowess is different from Loess
- Details for 'span' under 'loess' in the package 'stats'
Fitting is done locally. That is, for the fit at point x, the fit is made using points in a neighborhood of x, weighted by their distance from x (with differences in 'parametric' variables being ignored when computing the distance). The size of the neighborhood is controlled by 'alpha' (set by span or enp.target). For 'alpha'< 1, the neighbourhood includes proportion 'alpha' of the points, and these have tricubic weighting (proportional to (1 - (dist/maxdist)^3)^3. For 'alpha' > 1, all points are used, with the 'maximum distance' assumed to be 'alpha'^1/p times the actual maximum distance for 'p' explanatory variables.
For the default family, fitting is by (weighted) least squares. For family="symmetric" a few iterations of an M-estimation procedure with Tukey's biweight are used. Be aware that as the initial value is the least-squares fit, this need not be a very resistant fit.
- Explains about the NINE different ways to calculate a quantile
- "Hyndman and Fan (1996) recommend type 8. The default method is type 7, as used by S and by R < 2.0.0. "
Text from the 'par' document from the graphics package. It is valid for any function dealing with lines.
- Line types can either be specified by giving an index into a small built-in table of line types (1 = solid, 2 = dashed, etc, see lty above) or directly as the lengths of on/off stretches of line. This is done with a string of an even number (up to eight) of characters, namely non-zero (hexadecimal) digits which give the lengths in consecutive positions in the string. For example, the string "33" specifies three units on followed by three off and "3313" specifies three units on followed by three off followed by one on and finally three off. The 'units' here are (on most devices) proportional to lwd, and with lwd = 1 are in pixels or points or 1/96 inch.
- The five standard dash-dot line types (lty = 2:6) correspond to c("44", "13", "1343", "73", "2262").
- Note that NA is not a valid value for lty.
### Use the value of "0" or type "blank"
Tips
- Explains the general set up of Lattice
- Function to create 'rgb' colors easily
- PDF of major and minor uses of 'pch'
- Percentages for 'rainbow()'