sim_ind_pars: Simulate individual parameters from beta-like group-level...

View source: R/simulate_parameters.R

sim_ind_parsR Documentation

Simulate individual parameters from beta-like group-level priors (with lower and upper bounds)

Description

The function takes in group-level means ('mu' parameters), standard deviations ('sigmas')

Usage

sim_ind_pars(
  mu_list,
  sigma_list = NULL,
  range_list = NULL,
  sigma = 0.1,
  range = c(0, 1),
  nsub,
  seed = NULL
)

Arguments

mu_list

A list of group-level means. Each element needs to be named as the individual parameter.

sigma_list

(optional) A list of group-level standard deviation parameters, in beta distribution-space. If all sigmas are the same, this argument can stay as NULL

range_list

(optional) A list of group-level lower and upper bounds. If all bounds are the same, this argument can be skipped

sigma

(optional) Single value specifying all group-level standard deviation parameters

range

(optional) Single list specifying all group-level parameter ranges (c(lb, ub) format).

nsub

number of participants

seed

self-explanatory

Value

A list containing individual parameters


SpTB/wztools documentation built on July 2, 2023, 11:50 a.m.