1

I have the following packages loaded and I have tried reinstalling them in case it had not downloaded properly. That was not the issue. I'm working on the latest version of R and R studio.

library(Matrix)
library(lme4)
library(lmerTest)
library(emmeans)
library(stats)
library(fitdistrplus)
library(tidyverse)
library(buildmer)
library(performance)
library(see)
library(sjPlot)

After importing and transforming my data a little bit e.g. recoding 1's and 2's to more meaningful labels. I have run the following code which has always worked for me in the past.

modelRT4 <- lmer(RT4 ~ condition_number + 
                       (1 + condition_number | participant) +
                       (1 + condition_number | item_number), 
                       data = alldata_Pred_RT, REML = TRUE) 

However, now I am getting the error code...

Error in diag(Lambdat) : object 'R_sparse_diag_get' not found

For context RT4 is a reaction time measure in seconds. Whilst the others are self-explanatory.

I'm having no problems getting descriptives or visualising the data using violin plots and box plots.

Any ideas why this might be and what can be done to rectify this? I can show more code if needed.


The full code can be found on my GitHub page: https://github.com/E-LeLuan/ASC_small/blob/master/Tidy_RT_data/Prediction/Prediction_tidy_script.R

user20650
  • 24,654
  • 5
  • 56
  • 91
Elizabeth
  • 11
  • 2
  • `R_sparse_diag_get` is in `Matrix`: https://github.com/cran/Matrix/search?q=R_sparse_diag_get. Perhaps a version clash between Matrix and lme4. Can you update you r question with the results of `sessionInfo()` please. Also just to count out any clash with the bunch of packages you load, (but don't know why it would) does the error persist if you only load minimal packages into a new R session e.g. you may only need `lme4` for your example – user20650 Oct 11 '22 at 10:49
  • Hi Thanks for the response. I have tried loading it with only lme4 and I still get the same error. I've also tried importing the dataset and changing the col_types to numeric from dbl which has helped with past problems but not this one. R version 4.2.1 (2022-06-23 ucrt) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042) – Elizabeth Oct 11 '22 at 11:05
  • @user20650 The full code can be found on my GitHub page I don't know if that would be helpful to look at. https://github.com/E-LeLuan/ASC_small/blob/master/Tidy_RT_data/Prediction/Prediction_tidy_script.R – Elizabeth Oct 11 '22 at 11:16
  • 1
    Thanks Elizabeth. I just ran your script and did not receive your error; I got *boundary (singular) fit: see help('isSingular')*. So it would be good if you could [edit](https://stackoverflow.com/posts/74026783/edit) your question with the full results of `sessionInfo()` please ; this will include package version numbers. – user20650 Oct 11 '22 at 11:35
  • 1
    Singular fit is something I would address in future so that is not a problem. Good to know it is running elsewhere. I think I have now solved the problem. I have updated every single package via update.packages() and now I get the same singular fit error. Which program was the issue I'm not sure but most likely as you said earlier, I would bet 'matrix'. Thank you so much for your help and at least satisfying that the code runs fine. I do apologise for the inconvenience. I was unable to paste the session info as it was too large. – Elizabeth Oct 11 '22 at 11:43

0 Answers0