get_node_1_index_r | R Documentation |
Generates an integer matrix mapping experimental design cells to their corresponding indexes of the node 1 accumulator. The node 1 accumulator is the theoretical accumulator that reaches the threshold first. This function is primarily used for the LBA model.
get_node_1_index_r(parameter_map_r, factors_r, accumulators_r)
parameter_map_r |
An Rcpp::List where each element is a character vector mapping parameters to conditions. Names should correspond to parameters. |
factors_r |
An Rcpp::List where each element is a character vector of factor levels. Names should correspond to factor names. |
accumulators_r |
A character vector of response accumulator names. |
The function:
Computes node indices for each condition-response pair
Returns results as an R-compatible integer matrix
An integer matrix with dimensions:
Rows: Experimental conditions (cells)
Columns: Accumulators (responses)
Where values represent parameter indices for each condition-response combination.
cat("Flexible stimulus name")
p_map <- list(A = "1", B = "S", t0 = "E", mean_v = c("D", "M"),
sd_v = "M", st0 = "1")
factors <- list(S = c("sti_1", "sti_2", "sti_3", "sti_4"),
D = c("d1", "d2"), E = c("e1", "e2"))
responses <- c("resp_1", "resp_2", "resp_3", "resp_4")
# Get node indices
result <- get_node_1_index_r(p_map, factors, responses)
print(dim(result)[[1]])
# 64
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.