| quickPredict {STAR} | R Documentation |
Designed to quickly compute the effect of a single model term. This term can correspond to a single variable effect or to the interaction of two variables.
quickPredict(object, include = object$terms$labels[2], se.fit = TRUE,
length.out, otherTermsFct = median)
object %qp% include
object |
an object inheriting from ssanova and ssanova0
(gssanova and gssanova0 objects are therefore suitable).
|
include |
a character string corresponding to a single
model term. See predict.ssanova and predict.ssanova.
|
se.fit |
logical flag indicating if standard errors are
required. See predict.ssanova and predict.ssanova.
|
length.out |
a positive integer, the number of points at which
the prediction should be performed. These points are uniformly spread
on the definition domain of the variable(s) implicitely specified by
argument include. If missing a default of 501 for terms
involving a single variable and of 101 for interaction terms involving
two variables is provided.
|
otherTermsFct |
a function applied to the other variables required for model specification. |
%qp% is the binary version of quickPredict.
A quickPredict object. This object is a list with the following
components:
xx |
a numeric vector with the values of the variable specified by
the model term selected by argument include. When an interaction term was
selected the values of the first variable are stored here. |
yy |
a numeric vector with the values of the second variable specified by
the interaction term selected by argument include. When
selected term is not an interaction term, this component is
NULL. |
include |
the value of the argument with this name. |
call |
the matched call. |
est.mean |
a numeric vector or matrix, for intercation terms, containing the estimated mean of the term. |
est.sd |
a numeric vector or matrix, for intercation terms,
containing the estimated SD of the term. Is NULL is argument
se.fit was FALSE. |
Christophe Pouzat christophe.pouzat@gmail.com
predict.ssanova,
predict.ssanova,
plot.quickPredict,
image.quickPredict,
contour.quickPredict,
persp.quickPredict,
plot.ssanova
## Follow up of ssanova example of gss data(nox) nox.fit <- ssanova(log10(nox)~comp*equi,data=nox) ## get prediction for the first term, comp comp.pred <- quickPredict(nox.fit) ## plot result with method plot for quickPredict objects plot(comp.pred) ## get prediction for the second term, equi using the binary version equi.pred <- nox.fit %qp% "equi" plot(equi.pred) ## get prediction for the interaction term, comp:equi comp.equi.pred <- nox.fit %qp% "comp:equi" ## use image method image image(comp.equi.pred) ## use contour method contour(comp.equi.pred,col=2,lwd=2,labcex=1.5) contour(comp.equi.pred,what="sd",lty=3,labcex=1.2,add=TRUE) ## use persp method persp(comp.equi.pred,theta=-10,phi=20)