-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fourth corner model: "Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric" #27
Comments
Great that you're trying to use the package! Would you mind providing a reproducible example, possibly with some simulated data? Without a reproducible example it's more difficult to find out what's going on. |
Hi all, I've actually seen this issue with my own Interestingly, when fitting negative binomial models to count response data (allowing NAs in the responses), I would get the same I honestly think some of us might just need to share obscured versions of our datasets to really figure out what's going on, as it's not apparent to me what properties of my data could be simulated to reproduce the error. |
Does changing |
Sorry for the delay, Bert! For more detail, this model in question doesn't have any latent variables--does starting.val still affect non-LV models? |
Yes. |
Hi Bert--here's my delayed update, in short, it doesn't seem that changing the starting value has an effect. I've tried both 'zero' and 'random', but both still give Here's the model I tried:
Where As mentioned previously, my negative binomial model can handle the spoofed matrix approach just fine (same formula, minus the numeric variable), but the dev version is needed for this. |
Note that using "n.init" with "starting.val=zero"" is pointless since it will give the same result on every fit. Sorry, I cannot draw any conclusions from this. My suspicion is that the problem is highly dependent on the dataset in question. Even when I take the same approach; a different dataset but with a categorical variable with two levels and a numerical variable, I still cannot reproduce the issue. So, it will require a fully reproducible example, with simulations or a dataset, for me to look into this. |
Thank you for a useful package. It promises to offer the gains in efficiency we've been looking for.
I have successfully fitted a probit model without traits, but when I try the 4th corner model I get "Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric"
My traits (body length in 3 bins) are binary and I have ensured that they are stored in a dataframe as numeric variables.
Any advice on what might be causing the issue?
The text was updated successfully, but these errors were encountered: