-
Notifications
You must be signed in to change notification settings - Fork 24
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
Different results with different classes of the 'id' variable #76
Comments
Hi Nabeel. Thanks for your report and help. |
Hi Facundo, mod.anim.SHI <- remlf90(fixed = SHI ~ lot + date + plato + pos, Many thanks. |
Facundo, Best regards, Nabeel. |
Dear Nabeel,
library(tibble)
summary(
remlf90(y ~ 1, data = tibble(y = rnorm(10)))
)
#> No specification of initial variances.
#> Using default value of 1 for all variance components.
#> See ?breedR.getOption.
#> Linear Mixed Model with pedigree and spatial effects fit by AI-REMLF90 ver. 1.122
#> Data: tibble(y = rnorm(10))
#> AIC BIC logLik
#> 29.83 30.13 -13.92
#>
#> Parameters of special components:
#>
#>
#> Variance components:
#> Estimated variances S.E.
#> Residual 1.06 0.4999
#>
#> Fixed effects:
#> value s.e.
#> Intercept 0.15672 0.3257 Which error message did you get exactly? |
Hi there,
I recently tried to fit an animal model using the remlf90() function. My model was simple and contained 4 fixed effects, 1 random non-genetic effect and the genetic additive effect (pedigree). I compared the results (h2 + se) to those of BLUPF90 (airemlf90) and they were the same as they should be. Then, I changed the class of the 'id' variable in the genetic part of the model from integer to factor and I re-ran the model. The h2 was considerabley different from that I got when the 'id' was of class integer.
dat399$animal <- as.interger(dat399$animal) # h2 = 0.44, se = 0.012 (correct)
dat399$animal <- factor(dat399$animal) # h2 = 0.08, se = 0.006 (wrong)
dat399$animal <- as.interger(as.character(dat399$animal)) # h2 = 0.44, se = 0.012 (correct again)
So, is this normal, should the 'id' part of the genetic effect be always coded as integer or there is a bug that needs to be corrected?
Many thanks,
Nabeel.
The text was updated successfully, but these errors were encountered: