tmatta / lsasim

Simulate large scale assessment data
6 stars 5 forks source link

anova_table: implement SE calculation for different sample sizes #22

Open wleoncio opened 4 years ago

wleoncio commented 4 years ago

Summary

According to the following code, the anova_table() function is not able to calculate the standard error of the intraclass correlation when the sample sizes are different.

https://github.com/tmatta/lsasim/blob/844c889ace23fe8e8b3a41b54aedfec51d3968b8/R/anova_table.R#L39-L44

Theoretical references must be provided to implement this.

MRE

The following was performed on lsasim 2.0.2.9004.

remotes::install_github("tmatta/lsasim", "844c889a")
library(lsasim)
set.seed(12334)
n7 <- list(school = 10, student = ranges(10, 50))
r5 <- cluster_gen(n7, rho = c(0.005, 0.01, 0.85))
anova_table(r5)
wleoncio commented 4 years ago

@mollyolaf, @Kondwani84, @ylinglw, do any of you know where I could find the equation to calculate the standard error of rho (the intraclass correlation) when each sampling unit has a different size?

wleoncio commented 3 years ago

Reference: Donner (1986), equation (6.1)