Skip to content
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

Question about function 'residualplot_step1' #7

Open
storm-grass opened this issue Jul 27, 2023 · 5 comments
Open

Question about function 'residualplot_step1' #7

storm-grass opened this issue Jul 27, 2023 · 5 comments

Comments

@storm-grass
Copy link

Dear Hannah,

I'm having a problem with the function 'residualplot_step1'. When I run the examples:

library(ggplot2)
data(bmi_long, package = "LCTMtools")
require(lcmm)
model2class <- lcmm::hlme(
fixed = bmi ~ age,
mixture = ~age,
random = ~ -1,
nwg = TRUE, ng = 2, subject = "id",
data = data.frame(bmi_long[1:500, ])
)
residualplot_step1(model2class,
nameofoutcome = "bmi",
nameofage = "age",
data = bmi_long,
)

It displays the following error:
<error/rlib_error_dots_nonempty>
Error in dplyr::left_join():
! ... must be empty.
✖ Problematic argument:
• .by = nameofid

Backtrace:

  1. └─LCTMtools::residualplot_step1(...)
  2. ├─dplyr::left_join(preds, model$pprob, .by = nameofid)
  3. └─dplyr:::left_join.data.frame(preds, model$pprob, .by = nameofid)
    Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.

I have updated the 'dplyr' package and it still shows this error. My R version info is:
R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22621)

I wonder if you know what might be causing these errors?

Best wishes,
Coco

@hlennon
Copy link
Owner

hlennon commented Jul 27, 2023 via email

@storm-grass
Copy link
Author

Dear Hannah,

Thanks very much for getting your reply, I've been debugging the code as you said.
Have a nice life!

Best wishes,
Coco

@cccxxx66
Copy link

same issue

@yanngjie007999
Copy link

Dear Hannah,

Thanks very much for getting your reply, I've been debugging the code as you said. Have a nice life!

Best wishes, Coco

Hello, I met the same problem about function 'residualplot_step1'. Did you solve this problem?

Best wishes.

@1203li
Copy link

1203li commented May 29, 2024

Download the zip file of the package from the GitHub page. In the folder named "R code," simply modify these two lines of code:
test <- dplyr::left_join(preds, model$pprob, by = nameofid)
test <- dplyr::left_join(test, data, by = c(nameofid, nameofoutcome))
then you can solve this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants