get_affect_ppc | R Documentation |
get_affect_ppc
combines posterior predictions contained in a
posterior::draws_df()
outputted from a fit model with raw affect ratings,
and returns various fit metrics (pseudo-R^2
, MAE, RMSE), for each
individual. We follow Ferrari & Cribari-Neto (2004) in defining pseudo-R^2 as
the squared correlation between observed and mean posterior predictions.
get_affect_ppc(draws, raw, adj)
draws |
A |
raw |
Raw data, e.g., saved by |
adj |
Name of the affect adjective - one of "happy", "confident" or "engaged". |
List containing a dataframe with participant identifiers, numbers,
and pseudo R^2
, MAE and RMSE for each individual; and a named list (by
ID) of data frames with individuals' mean posterior predictions and raw
affect data.
## Not run:
fit_affect <- fit_learning_model(
example_data$nd,
model = "2a",
affect = TRUE,
exp_part = "training",
algorithm = "fullrank"
)
fit_ls_happy <- get_affect_ppc(
draws = fit_affect$draws,
raw = fit_affect$raw_df,
adj = "happy"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.