Closed njtierney closed 6 years ago
That's odd: you're using it entirely correctly, and I can't reproduce the problem. I take it residuals(lmfit)
does work?
The augment_columns
function is what adds the residuals: if you get the source code and start tinkering around the line ret$.resid <- residuals0(x)
(starting by changing it to ret$.resid <- residuals0(x)
to avoid the error catching), you might be able to figure out what's going on (I'd be happy to help with suggestions but am of limited immediate help since I can't reproduce it!)
Even I am having this problem now . residuals(lmfit) is working
R version 3.2.0 (2015-04-16) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] readr_0.1.1 broom_0.3.7 tidyr_0.2.0 lubridate_1.3.3 zoo_1.7-12
[6] data.table_1.9.4 dplyr_0.4.1
loaded via a namespace (and not attached):
[1] Rcpp_0.11.6 lattice_0.20-31 psych_1.5.4 digest_0.6.8 assertthat_0.1
[6] R6_2.0.1 chron_2.3-45 grid_3.2.0 plyr_1.8.2 DBI_0.3.1
[11] magrittr_1.5 stringi_0.4-1 lazyeval_0.1.10 reshape2_1.4.1 tools_3.2.0
[16] stringr_1.0.0 parallel_3.2.0 mnormt_1.5-3 memoise_0.2.1
Apologies for not replying sooner. I will try and have a look at your suggestions this week!
Thanks for being so quick at replying.
Gonna close this since I can't reproduce. I presume this would have been caught in the time since the issue was opened given how much tidy.lm
gets used.
This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.
I don't get a column with of residuals, I only get the standardized residuals, not the residuals, as in the example.
When I follow the example on the github page:
I get this:
Am I doing something wrong?