Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full Q matrices by default #47

Closed
ScottClaessens opened this issue Sep 27, 2024 · 4 comments · Fixed by #50
Closed

Full Q matrices by default #47

ScottClaessens opened this issue Sep 27, 2024 · 4 comments · Fixed by #50
Assignees
Labels
enhancement New feature or request

Comments

@ScottClaessens
Copy link
Owner

This is a copy of the issue opened by Erik, since his GitHub account is currently playing up. He said:

Currently, off-diagonals of the drift matrix (Q) are set to 0. I prescribed this based on some early results I had with some latent variable models where the cross-selection could not be identified simultaneously with correlated drift. So I assumed independent drift terms. But this has always bothered me somewhat, and revisiting the issue I think what I had found previously was a corner-case.

I have done some experiments with the two vignette datasets (authority and primates) and both fit just fine with the full Q matrices being estimated (p.s. the cross-selection results from the Austronesian example are qualitatively the same, just a bit more uncertain I guess owing to the greater model complexity).

In any case, I think this should probably be the default to estimate going forward. It is only ~4 lines of code difference in the Stan models, and should be easy to generalize. I think the only other change would be in the output of summary(object). @ScottClaessens I'll send you the example Stan files if you have time to implement, otherwise I can open a branch and do it.

@ScottClaessens ScottClaessens added the enhancement New feature or request label Sep 27, 2024
@ScottClaessens ScottClaessens self-assigned this Sep 27, 2024
@ScottClaessens
Copy link
Owner Author

We agreed to label this "drift covariance" and represent it in the summary output using double tildes (~~) as in the lavaan package. We will also include an argument in coev_fit() to allow users to set these to zero if they want to.

@ScottClaessens
Copy link
Owner Author

I'm working on this now. I'm thinking that, to be consistent with the rest of the output, we should probably use the form cor(X,Y) to present correlated drift in the summary output.

@ErikRingen
Copy link
Collaborator

cor(x,y) or cov(x,y)? If the former, we can construct the correlation matrix in generated quantities (R = LL'). In fact, it might be good to do this regardless.

@ScottClaessens
Copy link
Owner Author

Yep, the former. I’ve gone for the generated quantities approach. Should be done tinkering by tomorrow :)

@ScottClaessens ScottClaessens linked a pull request Oct 1, 2024 that will close this issue
ScottClaessens added a commit that referenced this issue Oct 1, 2024
#47 Estimated correlated drift by default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants