predict.ndlClassify {ndl} | R Documentation |
Predict method for ndlClassify objects
Description
Obtains predictions on the basis of a fitted "ndlClassify"
object on data already incorporated in the object or on new
data with the same predictors as the originally fitted model object.
Usage
## S3 method for class 'ndlClassify'
predict(object, newdata=NULL, frequency=NA,
type="choice", ...)
Arguments
object |
objects of class |
newdata |
optionally, a data frame in which to look for variables with
which to predict. If omitted (i.e. set to |
frequency |
A numeric vector (or the name of a column in the (new) data frame
|
type |
the type of prediction requested. The default option
|
... |
further arguments passed to and from other functions. |
Details
If newdata
is omitted the predictions are based on the data
used for the fit.
Value
a vector predicted
, or matrix of activations
activations
, or a matrix of predictions
probabilities
.
Author(s)
Antti Arppe
References
Arppe, A. and Baayen, R. H. (in prep.) Statistical classification and principles of human learning.
See Also
ndlClassify
, estimateActivations
, acts2probs
Examples
data(think)
think.ndl <- ndlClassify(Lexeme ~ Agent + Patient, data=think[1:300,])
head(predict(think.ndl, type="choice"))
predict(think.ndl, newdata=think[301:320,], type="probs")
predict(think.ndl, newdata=think[301:320,], type="acts")