Description Usage Arguments Details Value Author(s) References See Also Examples
ndlCuesOutcomes
creates a dataframe for fitting a naive
discriminative classification model with ndlClassify
, using
the specified formula and provided data.
1 2 3 |
formula |
An object of class |
data |
A data frame containing the variables in the model. |
frequency |
A numeric vector (or the name of a column in the input data frame) with the frequencies of the exemplars. If absent, each exemplar is assigned a frequency equal to 1. |
numeric2discrete |
A function to transform a continuous numeric predictor into a
number of discrete classes, by default |
g.numeric |
A parameter to be passed to the |
check.values |
A logical specifying whether underscores ‘_’ in predictor
values should substituted with periods ‘.’; if |
ignore.absent |
A character vector specifying one or more values for any predictor
(e.g. |
variable.value.separator |
A character string which will separate variable names from
variable values in their combination as cue values; by default an
empty character string ( |
... |
Control arguments to be passed along to |
Creates a dataframe to be used for fitting a Naive Discriminatory Learning classifier model.
A dataframe with the following columns:
Frequency
Frequency with which the specific Cues and Outcomes co-occur.
Cues
A character vector of sets of Cues per instance, with Cues separated by underscore ‘_’.
Outcomes
A character vector of Outcomes per instance.
R. H. Baayen and Antti Arppe
Arppe, A. and Baayen, R. H. (in prep.) Statistical modeling and the principles of human learning.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | data(think)
set.seed(314)
think <- think[sample(1:nrow(think),500),]
think.CuesOutcomes <- ndlCuesOutcomes(Lexeme ~ (Person * Number * Agent) + Register,
data=think)
head(think.CuesOutcomes)
## Not run:
data(dative)
dative.cuesOutcomes <- ndlCuesOutcomes(RealizationOfRecipient ~ LengthOfRecipient +
LengthOfTheme, data=dative, numeric2discrete=NULL)
table(dative.cuesOutcomes$Cues)
dative.cuesOutcomes1 <- ndlCuesOutcomes(RealizationOfRecipient ~ LengthOfRecipient +
LengthOfTheme, data=dative)
table(dative.cuesOutcomes1$Cues)
dative.cuesOutcomes2 <- ndlCuesOutcomes(RealizationOfRecipient ~ LengthOfRecipient +
LengthOfTheme, data=dative, g.numeric=3)
table(dative.cuesOutcomes2$Cues)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.