Closed garthtarr closed 6 years ago
Hi there,
I have fixed this bug already, but the fixes are on a brach that is not quite but almost ready for prime-time. This is the new rcpp branch.
You can install it using this:
library(devtools)
install_github("kollerma/fastGHQuad")
install_github("kollerma/robustlmm", ref = "rcpp")
The new version of the package depends on a slightly modified version of fastQHQuad, hence you need to install that version first.
Please let me know whether that works for you.
Best, Manuel
Hi, thanks for the quick reply!
I can install
install_github("kollerma/robustlmm")
without any problems, however, when I try to install
install_github("kollerma/robustlmm", ref = "rcpp")
it hangs with the following error
In file included from /Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51:
/Library/Frameworks/R.framework/Versions/3.4/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
#pragma clang diagnostic pop
^
PsiFunction.cpp:2:10: fatal error: 'robustbase.h' file not found
#include <robustbase.h>
^~~~~~~~~~~~~~
17 warnings and 1 error generated.
make: *** [PsiFunction.o] Error 1
ERROR: compilation failed for package ‘robustlmm’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/robustlmm’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/robustlmm’
Installation failed: Command failed (1)
I have the robustbase package installed, and tried explicitly loading it first, but that didn't help either...
As an aside, does this also fix the size of the saved object? I find when saving a rlmer object, the file size is way larger than if I'm saving a lmer object. E.g.
library("lme4")
library("robustlmm")
test1 = rlmer(Yield ~ (1|Batch), Dyestuff2, method="DASvar")
saveRDS(test1, file = "test1.rds")
test2 = lmer(Yield ~ (1|Batch), Dyestuff2)
saveRDS(test2, file = "test2.rds")
On my machine the robust object test1.rds
is 144KB whereas the lmer object test2.rds
is 30KB. The difference is more pronounced for non-trivial examples.
It looks like that the version of robustbase that you need hasn't been released yet. Try this:
install.packages("robustbase", repos="http://R-Forge.R-project.org")
You might be able to save some space by using rlmerRcpp instead of rlmer, but I doubt it'll be much. The calculations for the robust fit are much more involved, so they are always going to be slower and will need more memory.
This was fixed with the release of version 2.2-1.
With large data sets it can be quite computationally intensive to fit a rlmer model. I'd like to be able to save a fitted object and load it later. This is possible and partly works, but the summary method fails on the loaded object but it didn't fail in the session where the object was initially created, so it seems something (no idea what) is lost in the saving process.
MWE
This works OK:
When I start a new session and load in
test.rds
the print method works, but the summary method gives the error below.