Description Usage Arguments Details Value Author(s) See Also Examples
This function performs the prediction lifting step over intercept and regression order, for multiple point data.
1 2 | AdaptPredmp(pointsin, X, coefflist, coeff, nbrs, newnbrs, remove,
intercept, neighbours, mpdet, g)
|
pointsin |
The indices of gridpoints still to be removed. |
X |
the vector of grid values. |
coeff |
the vector of detail and scaling coefficients at that step of the transform. |
coefflist |
the list of detail and multiple scaling coefficients at that step of the transform. |
nbrs |
the indices (into X) of the neighbours to be used in the prediction step. |
newnbrs |
as nbrs, but repeated according to the multiple point structure of the grid. |
remove |
the index (into X) of the point to be removed. |
intercept |
Boolean value for whether or not an intercept is used in the prediction step of the transform. |
neighbours |
the number of neighbours in the computation of the predicted value. This is not actually used specifically in |
mpdet |
how the mutiple point detail coefficients are computed. Possible values are "ave", in which the multiple detail coefficients produced when performing the multiple predictions are averaged, or "min", where the overall minimum detail coefficient is taken. |
g |
the group structure of the multiple point data. |
The procedure performs adaptive regression (through AdaptPred) over the three types of regression and also over intercept. The combination (type of regression, intercept) is chosen which gives the smallest detail coefficient (in absolute value).
results.This is a ten item list giving the regression information chosen from the detail coefficient minimisation:
Xneigh |
matrix of X values corresponding to the neighbours of the removed point. The matrix consists of columns 1,X[newnbrs],X[newnbrs]^2,... depending on the order of the prediction used and whether or not an intercept is used. Refer to any reference on linear regression for more details. |
mm |
the matrix from which the prediction is made. In terms of Xneigh, it is |
bhat |
The regression coefficients used in prediction. |
weights |
the prediction weights for the neighbours. |
pred |
the predicted function value obtained from the regression. |
coeff |
vector of (modified) detail and scaling coefficients to be used in the update step of the transform. |
int |
if TRUE, an intercept was used in the regression. |
scheme |
a character vector denoting the type of regression used in the prediction ("Linear", "Quad" or "Cubic"). |
details |
a vector of the detail coefficients from which |
minindex |
the index into details (results[[9]]) which produces the minimum value. |
Matt Nunes (nunesrpackages@gmail.com), Marina Knight
AdaptNeighmp
, CubicPredmp
, fwtnpmp
, LinearPredmp
, QuadPredmp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #read in data with multiple values...
data(motorcycledata)
times<-motorcycledata$time
accel<-motorcycledata$accel
short<-adjustx(times,accel,"mean")
X<-short$sepx
coeff<-short$sepx
g<-short$g
coefflist<-list()
for (i in 1:length(g)){
coefflist[[i]]<-accel[g[[i]]]
}
#work out neighbours of point to be removed (31)
out<-getnbrs(X,31,order(X),2,TRUE)
nbrs<-out$n
nbrs
newnbrs<-NULL
for (i in 1:length(nbrs)){
newnbrs<-c(newnbrs,rep(nbrs[i],times=length(g[[nbrs[i]]])))
}
#work out repeated neighbours using g...
newnbrs
AdaptPredmp(order(X),X,coefflist,coeff,nbrs,newnbrs,31,TRUE,2,"ave",g)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.