Learn R Programming

robustlmm (version 3.3-1)

plot-methods: Plot an Object of the "Psi Function" Class

Description

The plot method objects of class PsiFunction simply visualizes the \(\rho()\), \(\psi()\), and weight functions and their derivatives.

Usage

# S4 method for Rcpp_SmoothPsi
plot(x, y,
     which = c("rho", "psi", "Dpsi", "wgt", "Dwgt"),
     main = "full", 
     col = c("black", "red3", "blue3", "dark green", "light green"),
     leg.loc = "right", ...)
# S4 method for Rcpp_HuberPsi
plot(x, y,
     which = c("rho", "psi", "Dpsi", "wgt", "Dwgt"),
     main = "full", 
     col = c("black", "red3", "blue3", "dark green", "light green"),
     leg.loc = "right", ...)
# S4 method for Rcpp_PsiFunction
plot(x, y,
     which = c("rho", "psi", "Dpsi", "wgt", "Dwgt"),
     main = "full", 
     col = c("black", "red3", "blue3", "dark green", "light green"),
     leg.loc = "right", ...)
# S4 method for Rcpp_PsiFunctionToPropIIPsiFunctionWrapper
plot(x, y,
     which = c("rho", "psi", "Dpsi", "wgt", "Dwgt"),
     main = "full", 
     col = c("black", "red3", "blue3", "dark green", "light green"),
     leg.loc = "right", ...)

Arguments

x

instance of class PsiFunction to be plotted

y

(optional) vector of abscissa values (to plot object at).

which

character vector of slots to be included in plot; by default, all of the slots are included

main

string or logical indicating the kind of plot title; either "full", "short" or FALSE which chooses a full, a short or no main title at all.

col

colors to be used for the different slots

leg.loc

legend placement, see also x argument of legend

...

passed to matplot

See Also

psi-functions.

Examples

Run this code
plot(huberPsiRcpp)
plot(huberPsiRcpp, which=c("psi", "Dpsi", "wgt"),
     main="short", leg = "topleft")

plot(smoothPsi)
## Plotting aspect ratio = 1:1 :
plot(smoothPsi, asp=1, main="short",
     which = c("psi", "Dpsi", "wgt", "Dwgt"))

Run the code above in your browser using DataLab