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

Issue with link function in Mundlak Machine bonus content #450

Open
GuiMarthe opened this issue Nov 27, 2024 · 0 comments
Open

Issue with link function in Mundlak Machine bonus content #450

GuiMarthe opened this issue Nov 27, 2024 · 0 comments

Comments

@GuiMarthe
Copy link

Hello folks

There seems to be a bug somewhere in the link function or model definition in the Mundlack Machine script.

In line 151 from https://github.com/rmcelreath/stat_rethinking_2024/blob/main/scripts/12_bonus_mundlak.r#L151 you are creating predictions from the posterior samples on top of the data.

But I keep getting the following error

> pf0 <- link(mf,data=list(g=1:N_groups,X=rep(0,N_groups)))
Error in Z[TRUE, g[i]] : incorrect number of dimensions

And it seems due to the usage of g as an index variable, but I couldn't figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant