Coder Social home page Coder Social logo

Error: Unable to compute predicted values with this model. This error can arise when `insight::get_data()` is unable to extract the dataset from the model object about ggeffects HOT 6 CLOSED

zhaoliang0302 avatar zhaoliang0302 commented on June 21, 2024
Error: Unable to compute predicted values with this model. This error can arise when `insight::get_data()` is unable to extract the dataset from the model object

from ggeffects.

Comments (6)

strengejacke avatar strengejacke commented on June 21, 2024 1

hm, can't reproduce, works for me:

library(easystats)
#> # Attaching packages: easystats 0.6.0.13
#> ✔ bayestestR  0.13.1.7     ✔ correlation 0.8.4.9000
#> ✔ datawizard  0.9.0.1      ✔ effectsize  0.8.6.1   
#> ✔ insight     0.19.5.13    ✔ modelbased  0.8.6.4   
#> ✔ performance 0.10.6       ✔ parameters  0.21.2.6  
#> ✔ report      0.5.7.11     ✔ see         0.8.0.5
library(ggeffects)
#> 
#> Attaching package: 'ggeffects'
#> The following object is masked from 'package:easystats':
#> 
#>     install_latest
library(lme4)
#> Loading required package: Matrix

load("c:/Users/mail/Desktop/tmp.rda")

LME_model <- lmer(Y ~ YEAR * Group + age + duration_yrs + SEX + (1 + YEAR | PATNO), tmp)
mydf <- ggpredict(LME_model, c("YEAR", "Group"))
plot(mydf)

hypothesis_test(mydf)
#> # Linear trend for YEAR
#> 
#> Group    | Contrast |        95% CI |     p
#> -------------------------------------------
#> low-high |    -0.10 | [-0.24, 0.04] | 0.150

Created on 2023-10-12 with reprex v2.0.2

Can you try following two steps:

  1. easystats::install_latest(force = TRUE)
  2. ggeffects::install_latest(force = TRUE)

and then retry?

from ggeffects.

zhaoliang0302 avatar zhaoliang0302 commented on June 21, 2024 1

It works after install_latest(force = TRUE). Thanks for your time!

from ggeffects.

strengejacke avatar strengejacke commented on June 21, 2024

Do you have a reproducible example? Furthermore, have you tried to convert the tibble tmp into a real data frame (using as.data.frame())?

from ggeffects.

zhaoliang0302 avatar zhaoliang0302 commented on June 21, 2024

Thanks for your rapid reply! tmp data file is uploaded: https://www.dropbox.com/scl/fi/brl335xg23w1e3u6v224c/tmp.rda?rlkey=xyutctt6q5yd4yl8qoy42ihlb&dl=0

from ggeffects.

strengejacke avatar strengejacke commented on June 21, 2024

For some reason, dropbox server don't seem to work (temporarily?). Could you zip the file and add as attachment to this thread?

from ggeffects.

zhaoliang0302 avatar zhaoliang0302 commented on June 21, 2024

tmp.zip
Thanks a lot!

from ggeffects.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.