| candidate_fit | R Documentation |
An enumeration keeps every candidate it fitted. This returns one of them, so that a caller who wants to plot, summarise or test a particular candidate names it by its class counts instead of indexing the grid by position.
candidate_fit(x, n_profiles, n_group_classes = 1L, model = NULL)
x |
An |
n_profiles |
Number of individual profiles identifying the candidate. |
n_group_classes |
Number of group classes identifying the candidate. |
model |
The covariance model identifying the candidate, needed when
|
The fitted model for that cell of the grid: an object of class
multilpa, exactly as multilpa() returned it, with every verb of this
package available on it.
latents_unknown_candidate when the requested class counts are not in
the grid, and latents_failed_candidate when they are in the grid but
that fit raised an error, so no model exists to return. Neither situation
returns NULL, because a NULL would flow silently into whatever the
caller did next.
set.seed(1)
d <- data.frame(g = rep(1:10, each = 10), y = rnorm(100))
candidates <- enumerate_classes(d, "y", "g", n_profiles = 1:2,
n_group_classes = 1, n_starts = 2, seed = 1)
candidate_fit(candidates, n_profiles = 2, n_group_classes = 1, model = "VVI")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.