parameters CI linear mixed model: profile function using lme4 or lme4a - r

I am trying to calculate the 95% confidence intervals of a linear mixed model calculated with lmer() function from lme4 package. Reading Baker (2010) there is a way to calcuilate the cononfidence interval of the parameters, and it can also serve to create profile plots of the parameters to assess the variability of the parameter estimates (see the book available at: http://lme4.r-forge.r-project.org/lMMwR/).
I am very interesting in see how the parameters of my model and calculate the confidence intervals. After read some related post answered by Baker the lme4a version of the package could have this library instaled. I have been able to successfully download and instal this library from r-forge and I also tried to download and instal the lme4 packages from the url: http://lme4.r-forge.r-project.org/repos/bin/windows/contrib/2.15/
However, I was not able to load the library successfuly. Now when I try to load the library lme4 it gives me the next error:
Error in loadNamespace(i[[1L]], c(lib.loc, .libPaths())) :
there is no package called ‘minqa’
Error: package/namespace load failed for ‘lme4’
And the next one for the library lme4a:
Error: package ‘minqa’ required by ‘lme4a’ could not be found
I am sure that I am doing something wrong, but I am not able to find the solution. Any suggestion will be very welcome! Many thanks in advance

Related

How to set scale and bias in CatBoost R package

The catboost documentation contains instructions for setting model scale and bias in the Python package (here) and the command line implementation (here), but not the R package.
Can anyone show how it is done in R?

Is there an alternative to elrm (Exact logistic regression) in R - the elrm package is not available in repository

I am trying to run a simple binary logistic regression, but one of my cells has a 0. Because of this, I wanted to run exact logistic regression but I get that package elrm is not available for R 3.6.2.
I researched online and found you could install from archive, but I have never done that before.
I tried the following, but still got the message that "ERROR: dependency 'coda' is not available for package 'elrm'
elrmurl <- "https://cran.r-project.org/src/contrib/Archive/elrm/elrm_1.2.3.tar.gz"
install.packages(elrmurl, repos=NULL, type="source")
I'm very out of my depth with this one but would appreciate any guidance on either 1) how to properly install the elrm package from archive (https://cran.r-project.org/src/contrib/Archive/elrm/) or 2) potential alternative packages that might allow me to do exact logistic regression in R.
Try :
install.packages("devtools")
library(devtools)
Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
install_github("cran/elrm")
You probably already thought about it, but you could also collapse or delete levels in order to have enough observations to do a regular logistic regression with glm

how to suppress the divergence or singularity message in validate function of rms package

How can I suppress the "divergence or singularity in samples" message in the validate function of the rms package. I have read the documentation, searched Harrell's 2015 book, and searched internet without success. Thank you very much. pbm

package required for "mmetric" function in R

I'm trying out Naive Bayes classification using stock dataset in R. Now for displaying the final results I've seen a function mmetric taking testing data and prediction model as arguments. But while I'm trying the same I'm facing the error could not find function "mmetric". I have installed the rminer and list packages which are quotes as reference packages for these. But still I could not resolve it.
Any Suggestions to resolve the error?
I got same error but i updated my Rcpp package that will be needed by rminer to load on the system, hope this helps.

Error in 'ts' function when using 'zoib' R package for beta regression

I am working with the R package 'zoib' for performing beta regression in R. I am trying to replicate the example included on page 41 in the paper the package authors published in The R Journal:
Lui F and Kong Y. 2015. zoib: An R Package for Bayesian Inference for Beta Regression and Zero/One Inflated Beta Regression. The R Journal 7(2)
I believe I am using the exact same data and code that they use:
library(zoib)
data("GasolineYield", package="zoib")
GasolineYield$batch <- as.factor(GasolineYield$batch)
d <- GasolineYield
eg1.fixed <- zoib(yield ~ temp + as.factor(batch) | 1, data=GasolineYield, joint=FALSE,
random=0, EUID=1:nrow(d), zero.inflation=F, one.inflation=F,
n.iter=1050, n.thin=5, n.burn=50)
sample1 <- eg1$coeff
traceplot(sample1)
autocorr.plot(sample1)
gelman.diag(sample1)
However, I am getting an error when I try to do the diagnostic plots on the samples. This is the error message:
Error in ts(seq(from = start(x), to = end(x), by = thin(x)), start = start(x), :
invalid time series parameters specified
I cannot understand why the code isn't working or what I can do to fix the problem. I can trace the error to the time function which is called by zoib, and it seems like maybe it is a problem that the sample object does not have a tsp attribute, but the zoib package authors make it clear that their model output is meant to be used with coda, so I am very confused. I don't have much experience working with MCMC or time series objects, so maybe I am just missing something obvious. Can anyone explain why the example provided by the package authors is failing, and what the solution is?
I e-mailed the package author (Fang Liu) and she informed me that there was in fact a bug in the version of the package I have, but that the bug is fixed in the most recent version of zoib (Version 1.4.2). Using the most recent version, the code now works.

Resources