-
Notifications
You must be signed in to change notification settings - Fork 10
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
Confidence Intervals Errors #7
Comments
Hi, I am not sure what is happening. I run some scripts on the toy dataset (
At the same time, I find this In conclusion, it is hard to say whether the errors come due to I will keep exploring this issue, but I actually don't have much time. Feel free to do some experiments and I will be happy to follow them. Best, |
Another quick comment:
There you will see that the Wald method gives you CI estimates, but only for fixed effects:
|
I added a relevant example in REDME.Rmd + examples that mostly fail in demo/profile.R. m2 <- relmatLmer(trait2 ~ (1|ID), dat40, relmat = list(ID = kin2))
VarProp(m2)
prof <- profile(m2)
prof_prop <- varpropProf(prof)
confint(prof_prop) Going back to the first post here:
For me it is still an open question on how to perform profiling. Any suggestions and tips are welcome. |
I tried the delta method in demo/se.R and added some links at the top of script. data(dat40, package = "lme4qtl")
m <- relmatLmer(trait1 ~ AGE + SEX + (1|FAMID) + (1|ID), dat40, relmat = list(ID = kin2))
# hessian
f <- update(m, devFunOnly = TRUE)
th <- getME(m, "theta")
library(numDeriv)
h <- numDeriv::hessian(f, th)
library(MASS)
cov <- MASS::ginv(h)
# delta method
nth <- length(th)
terms <- paste0("x", seq(nth), "*", "x", seq(nth)) # "x1*x1" "x2*x2"
terms <- c(terms, "1") # # "x1*x1" "x2*x2", "1"
total <- paste(terms, collapse = " + ") # "x1*x1 + x2*x2 + 1"
forms <- lapply(seq(nth), function(i)
paste("~", terms[i], "/ (", total, ")"))
library(msm)
ses <- sapply(forms, function(f)
msm::deltamethod(as.formula(f), th, cov, ses = TRUE)) I get the following results.
|
Dear Andrey,
First, thanks for developing lme4qtl, I have been looking for this kind of package for a while.
Second, I attempted to compute confidence intervals with the example data as well as with my own data and receive lots of warnings and errors. I used the code from the paper supplement and applied it to the quick start example:
I get following warnings from profile():
and then when using varpropProf():
Is there any error in the script or is this bug? Are there alternative ways to obtain confidence intervals? I would appreciate it, if you could help with obtaining confidence intervals.
The text was updated successfully, but these errors were encountered: