JeroenDMulder / powRICLPM

powRICLM: Power analysis for the random intercept cross-lagged panel model
https://jeroendmulder.github.io/powRICLPM
Other
4 stars 1 forks source link

Issue with constraints #1

Closed dbaranger closed 2 years ago

dbaranger commented 2 years ago

Hi! Thanks for the great package. I've run into one issue, perhaps I'm misunderstanding something. As I understand it, the 'constraints' field sets various parameters (depending on the option) to be the same across time points. One advantage is that this reduces the number of estimated parameters, freeing up degrees of freedom. The 'powRICLPM' performs a check to ensure that there's enough degrees of freedom to estimate all the free parameters. However, this check doesn't seem to incorporate how the 'constraints' option would decrease the number of free parameters. In my case, I get the error that the sample size is too small - and the error message doesn't change depending on which 'constraints' option I've used (the number of parameters to be estimated is the same). Is this expected behavior? Thanks in advance! ~David

JeroenDMulder commented 2 years ago

Hi David, Thanks for pointing this out. Indeed, in version 0.0.0.9004 the checks on the sample_size argument do not incorporate the constraints imposed on the estimation model, hence the error message. I've added this issue to the "Projects" page and will solve this in the next version of the package. Despite this, I would not recommend using an RI-CLPM with a sample size less than 30 or so, for reasons of both bias and power.

dbaranger commented 2 years ago

Awesome, thanks!

dbaranger commented 2 years ago

Thanks!