[R-sig-ME] [EXT] Re: Re: partial effects plots

Daniel Lüdecke d@|uedecke @end|ng |rom uke@de
Wed Jul 31 08:37:48 CEST 2024


Dear all,
yes, partial *residuals* are possible with the effects package (see https://cran.r-project.org/web/packages/effects/vignettes/partial-residuals.pdf) or ggeffects (https://strengejacke.github.io/ggeffects/articles/introduction_partial_residuals.html).

I don't think partial *regression* plots are possible for any of those packages (maybe for the effects package, I'm not sure).

Laura, maybe you can clarify what kind of plots you would like to have? Terminology may be unclear here. I'm not sure if I confused partial *effects* with partial *regression* plots. Beside the mentioned functions in the car-package, this website describes partial-effects plots: https://rpubs.com/milesdwilliams15/328471

Best
Daniel

-----Ursprüngliche Nachricht-----
Von: John Fox <jfox using mcmaster.ca> 
Gesendet: Dienstag, 30. Juli 2024 23:08
An: Ben Bolker <bbolker using gmail.com>; Daniel Lüdecke <d.luedecke using uke.de>; Laura_Lee using fws.gov
Cc: r-sig-mixed-models using r-project.org
Betreff: [EXT] Re: [R-sig-ME] Re: partial effects plots

Dear Ben, Daniel, and Laura,

First, added-variable (partial-regression) plots are often confused with component + residuals (partial-residual) plots, but they are not the same.

Second, "effect" plots are essentially component + residuals plots (possibly without the residuals).

Finally, it's possible to show partial residuals in effect plots for mixed models constructed by the effects package.

I hope this helps,
  John

--
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://www.john-fox.ca/
--

On 2024-07-30 4:52 p.m., Ben Bolker wrote:
> Caution: External email.
> 
> 
>    OK, in this case you'll need to be able to generate partial 
> residuals, which may be doable via the package at 
> https://github.com/hohenstein/remef
> 
> On 7/30/24 16:30, Daniel Lüdecke wrote:
>> I'm not sure if the partial effects plots differ from what emmeans, 
>> ggeffects, effects etc. plot by default.
>> Isn't another name for "partial effects plots" the "added variables 
>> plot", implemented in car::avPlot() / car::avPlots()?
>>
>> Not sure if mixed models are supported, though.
>>
>> -----Ursprüngliche Nachricht-----
>> Von: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> Im 
>> Auftrag von Ben Bolker
>> Gesendet: Dienstag, 30. Juli 2024 22:18
>> An: r-sig-mixed-models using r-project.org
>> Betreff: [EXT] Re: [R-sig-ME] partial effects plots
>>
>>     Start with emmeans or effects packages? In particular
>>
>> library(effects)
>>
>> plot(allEffects(fitted_model))
>>
>> On 7/30/24 15:44, Lee, Laura M via R-sig-mixed-models wrote:
>>> Hello all,
>>>
>>> I have fit a GLMM to presence/absence data (family = binomial) from 
>>> an acoustic telemetry study. I have five fixed effects-Year (a 
>>> factor), Day of Year, Hour of Day, Sex (a factor), and water 
>>> temperature-and one random effect-Fish ID (a factor). I am looking 
>>> to create partial effects plots for the covariates. Can anyone 
>>> direct me to some sample code or suggest a package to help me get 
>>> started. My Google searches haven't been very fruitful.
>>>
>>> I would appreciate any assistance on this matter. Thank you for your 
>>> time!
>>>
>>>
>>> Best,
>>>
>>> Laura
>>>
>>>
>>> #############################
>>> Laura M. Lee
>>> USFWS - Northeast Fishery Center
>>> P.O. Box 75
>>> 308 Washington Ave.
>>> Lamar, PA  16848
>>> Phone: 570-726-4247 x 50122
>>> Laura_Lee using fws.gov<mailto:Laura_Lee using fws.gov>
>>> #############################
>>>
>>>
>>>
>>>      [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-sig-mixed-models using r-project.org mailing list 
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>> _______________________________________________
>> R-sig-mixed-models using r-project.org mailing list https://stat.ethz.ch/ 
>> mailman/listinfo/r-sig-mixed-models
>>
>> --
>>
>> _____________________________________________________________________
>>
>> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen 
>> Rechts; Gerichtsstand: Hamburg | www.uke.de
>> Vorstandsmitglieder: Prof. Dr. Christian Gerloff (Vorsitzender), 
>> Joachim Prölß, Prof. Dr. Blanche Schwappach-Pignataro, Corinna Wriedt 
>> _____________________________________________________________________
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list 
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models


--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Christian Gerloff (Vorsitzender), Joachim Prölß, Prof. Dr. Blanche Schwappach-Pignataro, Corinna Wriedt
_____________________________________________________________________


More information about the R-sig-mixed-models mailing list