# Simulation

## Using cmdstanr in SimDesign

library(SimDesign) library(cmdstanr) [Update: Use parallel computing with two cores.] Adapted from https://cran.r-project.org/web/packages/SimDesign/vignettes/SimDesign-intro.html See https://mc-stan.org/cmdstanr/articles/cmdstanr.html for using cmdstanr Design <- createDesign(sample_size = c(30, 60, 120, 240), distribution = c('norm', 'chi')) Design ## # A tibble: 8 x 2 ## sample_size distribution ## <dbl> <chr> ## 1 30 norm ## 2 60 norm ## 3 120 norm ## 4 240 norm ## 5 30 chi ## 6 60 chi ## 7 120 chi ## 8 240 chi Generate <- function(condition, fixed_objects = NULL) { N <- condition$sample_size dist <- condition$distribution if(dist == 'norm'){ dat <- rnorm(N, mean = 3) } else if(dist == 'chi'){ dat <- rchisq(N, df = 3) } dat } Define Bayes estimator of the mean with STAN

## Adjusting for Measurement Noninvariance With Alignment in Growth Modeling

The proposed AwC-growth method is a computationally efficient method to adjust for measurement noninvariance to obtain valid growth parameter estimates.

## Two-stage path analysis with definition variables: An alternative framework to account for measurement error

The proposed 2S-PA method, which estimated factor scores and the corresponding standard errors in the first stage, and use SEM with definition variables in the second stage, showed favorable performance in small samples compared to full SEM.

## Adjusting for partial invariance in latent parameter estimation: Comparing forward specification search and approximate invariance methods

A series of simulation studies which found that alignment optimization works well for adjusting for measurement noninvariance in few groups.

## Bootstrap confidence intervals for multilevel standardized effect size

Although many methodologists and professional organizations have urged applied researchers to compute and report effect size measures accompanying tests of statistical significance, discussions on obtaining confidence interval (CI) for effect size …

## Modeling measurement errors of the exogenous composites from congeneric measures in interaction models

We investigated the performance of two single indicator methods: latent moderated structural equation (LMS) and reliability-adjusted product indicator (RAPI) methods, on testing interaction effects with congeneric measures, which vary in factor …