dr(formula, data=list(), subset, weights, na.action=na.omit, method="sir",
contrasts=NULL,offset=NULL, ...)
dr.weights(formula, data=list(), subset, weights, na.action=na.omit, method="sir",
contrasts=NULL,offset=NULL, ...)
nslices
is the number of slices used by sir and save.
numdir
is the maximum number of directions to compute, with
default equal to 4.method
argument), with attributes:dr.weights
returns a vector of weights NA substituted for estimated
zero weights.
Weights can be used, essentially to specify the relative
frequency of each case in the data. Empirical weights that make
the contours of the weighted sample closer to elliptical can be
computed using dr.weights
.
This will usually result in zero weight for some
cases. The function will set zero estimated weights to missing.
Several functions are provided that require a dr object as input.
dr.permutation.tests
uses a permutation test to obtain significance levels
for tests of dimension. dr.coplot
allows visualizing the results using a
coplot of either two selected directions conditioning on a third and using
color to mark the response, or the resonse versus one direction,
conditioning on a second direction. plot.dr
provides the default plot
method for dr objects, based on a scatterplot matrix.
dr.permutation.test
,dr.x
,dr.y
,
dr.direction
,dr.coplot
,dr.weights
library(dr)
data(ais)
attach(ais) # the Australian athletes data
#fit dimension reduction using sir
m1 <- dr(LBM~Wt+Ht+RCC+WCC, method="sir", nslices = 8)
summary(m1)
# repeat, using save:
m2 <- update(m1,method="save")
summary(m2)
# repeat, using phd:
m3 <- update(m2, method="phdres")
summary(m3)
Run the code above in your browser using DataLab