[R] standardized regression coefficients in GAM
Fox, John
j|ox @end|ng |rom mcm@@ter@c@
Thu Aug 30 20:37:17 CEST 2018
Dear Dani,
I'll address your questions briefly below. They aren't unique to GAMs.
> -----Original Message-----
> From: R-help [mailto:r-help-bounces using r-project.org] On Behalf Of dani
> Sent: Thursday, August 30, 2018 12:47 PM
> To: r-help using r-project.org
> Subject: [R] standardized regression coefficients in GAM
>
> Hello everyone,
>
>
> I was wondering if anyone can help me calculate standardized regression
> coefficients from a GAM model.
>
> I have some dummy and some continuous covariates in my GAM model. I
> know I could standardize only the continuous covariates and re-run the model
> to get the standardized coefficients. Can anyone help with some R code to
> create the standardized coefficients after obtaining a GAM model based on
> unstandardized coefficients?
Why one would want to do this isn't clear to me, but you can just multiply each such coefficient by the standard deviation of the corresponding X and divide by the standard deviation of Y.
>
>
> Also, on a separate note, what do I do with the dummy covariates - should I
> just include them as they are in the model with standardized variables? I do
> not see how I can standardize dummy variables.
Standardizing dummy regressors is nonsense, so don't do it. If there are interaction regressors in your model, don't standardize those either.
I hope this helps,
John
-----------------------------------------------------------------
John Fox
Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
Web: https://socialsciences.mcmaster.ca/jfox/
>
>
> Thank you!
>
> Best,
>
> Dani
>
> <http://aka.ms/weboutlook>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-
> guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list