plot.kspm: Plot Diagnostics for a kspm Object

Description Usage Arguments Author(s) References See Also Examples

View source: R/plotKspm.R

Description

Five plots (selectable by which) are currently available: a plot of residuals against fitted values, a scale Location plot of sqrt(| residuals |) against fitted values, a Normal Q Q plot for residuals, a plot of Cook's distances versus row labels and a plot of residuals against leverages. By default, the first three and 5 are provided.

Usage

1
2
3
4
## S3 method for class 'kspm'
plot(x, which = c(1:3, 5), cook.levels = c(0.5, 1),
  id.n = 3, labels.id = names(x$residuals), cex.id = 0.75,
  col.id = "blue", ...)

Arguments

x

an object of class "kspm", usually, a result of a call to kspm.

which

if a subset of the plots is required, specify a subset of the numbers 1:5.

cook.levels

levels of Cook's distance at which to draw contours.

id.n

number of points to be labelled in each plot, starting with the most extreme.

labels.id

vector of labels, from which the labels for extreme points will be chosen. NULL uses names associated to response specified in kspm.

cex.id

size of point labels.

col.id

color of point labels.

...

further arguments passed to or from other methods.

Author(s)

Catherine Schramm, Aurelie Labbe, Celia Greenwood

References

Kim, Choongrak, Byeong U. Park, and Woochul Kim. "Influence diagnostics in semiparametric regression models." Statistics and probability letters 60.1 (2002): 49:58.

See Also

kspm for fitting the model, summary.kspm for summary

Examples

1
2
3
4
5
6
7
x <- 1:15
z1 <- runif(15, 1, 6)
z2 <- rnorm(15, 1, 2)
y <- 3*x + (z1 + z2)^2 + rnorm(15, 0, 2)
fit <- kspm(y, linear = ~ x, kernel = ~ Kernel(~ z1 + z2,
kernel.function = "polynomial", d= 2, rho = 1, gamma = 0))
plot(fit)

KSPM documentation built on Aug. 10, 2020, 5:07 p.m.