Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.robmlm

Plot observation weights from a robust multivariate linear models


Description

Creates an index plot of the observation weights assigned in the last iteration of robmlm. Observations with low weights have large residual squared distances and are potential multivariate outliers with respect to the fitted model.

Usage

## S3 method for class 'robmlm'
plot(x, labels, 
     id.weight = 0.7, id.pos = 4, 
     pch = 19, 
     col = palette()[1], cex = par("cex"), 
     segments = FALSE,
     xlab = "Case index", ylab = "Weight in robust MANOVA", ...)

Arguments

x

A "robmlm" object

labels

Observation labels; if not specified, uses rownames from the original data

id.weight

Threshold for identifying observations with small weights

id.pos

Position of observation label relative to the point

pch

Point symbol(s); can be a vector of length equal to the number of observations in the data frame

col

Point color(s)

cex

Point character size(s)

segments

logical; if TRUE, draw line segments from 1.o down to the point

xlab

x axis label

ylab

y axis label

...

other arguments passed to plot

Value

Returns invisibly the weights for the observations labeled in the plot

Author(s)

Michael Friendly

See Also

Examples

data(Skulls)
sk.rmod <- robmlm(cbind(mb, bh, bl, nh) ~ epoch, data=Skulls)
plot(sk.rmod, col=Skulls$epoch)
axis(side=3, at=15+seq(0,120,30), labels=levels(Skulls$epoch), cex.axis=1)

# Pottery data

pottery.rmod <- robmlm(cbind(Al,Fe,Mg,Ca,Na)~Site, data=Pottery)
plot(pottery.rmod, col=Pottery$Site, segments=TRUE)

# SocialCog data

data(SocialCog)
SC.rmod <- robmlm(cbind( MgeEmotions, ToM, ExtBias, PersBias) ~ Dx,
               data=SocialCog)
plot(SC.rmod, col=SocialCog$Dx, segments=TRUE)

heplots

Visualizing Hypothesis Tests in Multivariate Linear Models

v1.3-8
GPL (>= 2)
Authors
John Fox [aut], Michael Friendly [aut, cre], Georges Monette [ctb], Phil Chalmers [ctb]
Initial release
2021-01-20

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.