Description Usage Arguments Details Value Author(s) References See Also Examples
A test for the completeness of a linear regression model can be performed based on comparing the differences of residuals for pairs of observations that are close to each other to the estimated standard deviation of the
1 2 3 | xdistResdiff(object, perc = c(3, 10, 80), trim = 0.1,
nmax = 100, nsim = 100, out = "aggregate")
xdistResscale(x, perc = c(3, 10, 90), trim = 1/6)
|
object |
an object containing the result of fitting a linear
model by |
x |
an object produced by |
perc |
Percentage points to define distance classes |
trim |
Trimming proportion for calculating means of absolute residual differences |
nmax |
maximal number of observations to form pairs |
nsim |
number of simulations for determining the null distribution of test statistics |
out |
determines the value of |
See package vignette.
For xdistResdiff with out="aggregate" and
xdistResscale, a matrix is returned with a row for
each class of x distances and the columns
xdist |
mean x distance |
rdiff.mean |
absolute differences of residuals for pairs of observations in the distance class, averaged over the class |
rdiff.simmean |
mean of (trimmed) means for simulated data |
rdiff.se |
standard error of (trimmed) means as obtained from simulation |
The matrix carries along the following attributes:
perc |
given argument |
xd.classlim |
the actual class limits corresponding to
|
trim |
given argument |
rdiff.grandmean |
overall mean of absolute residual differences |
p-values |
p values for the classes as obtained from simulation, and p-value for the sum of squares statistic |
class |
The value has S3 class |
.
If xdistResdiff with out different from
"aggregate", then a data.frame is returned containing a row for
each pair of observations and the columns
id1, id2 |
the labels of the two observations |
xdist |
the x distance between the two observations |
resdiff |
the difference of residuals for the two observations |
The value has S3 class xdistResdiff and data.frame.
Werner A. Stahel, ETH Zurich
See package vignette.
1 2 3 4 5 6 7 8 | data(d.blast)
rr <- regr(tremor~distance+charge, data=d.blast)
## an inadequate model!x
xdistResdiff(rr)
xdrd <- xdistResdiff(rr, out="all")
showd(xdrd[,1:10])
xdistResscale(xdrd)
## same as first call of xdiffResdiff
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.