Discussion:
[R-sig-ME] question about a GAM model
dani
2018-08-28 00:58:15 UTC
Permalink
Hi everyone,


I have a question about a GAM model where I included three non-parametric terms. I obtained the results below. can I conclude that the associations were in fact linear and run a final GLM model without including splines? To me it seems unnecessary to include splines in the final model. How should I report these results?


# Approximate significance of smooth terms:
# edf Ref.df Chi.sq p-value
# s(x1) 1.61 2.01 1.17 0.550
# s(x2) 1.00 1.00 0.00 0.955
# s(x3) 1.00 1.00 4.61 0.032 *

Thank you very much,
Dani





[[alternative HTML version deleted]]
Bansal, Udita
2018-08-28 09:51:58 UTC
Permalink
Hi Dani,

I don’t know much about GAM but I know you can look at the plots for fitted model results to check if there is any curvature. You can use the following code:

par(mfrow = c(1,3))
plot(GAMmodel)

Bests
Udita

On 28/08/18, 1:58 AM, "R-sig-mixed-models on behalf of dani" <r-sig-mixed-models-***@r-project.org on behalf of ***@live.com> wrote:

Hi everyone,


I have a question about a GAM model where I included three non-parametric terms. I obtained the results below. can I conclude that the associations were in fact linear and run a final GLM model without including splines? To me it seems unnecessary to include splines in the final model. How should I report these results?


# Approximate significance of smooth terms:
# edf Ref.df Chi.sq p-value
# s(x1) 1.61 2.01 1.17 0.550
# s(x2) 1.00 1.00 0.00 0.955
# s(x3) 1.00 1.00 4.61 0.032 *

Thank you very much,
Dani





[[alternative HTML version deleted]]

_______________________________________________
R-sig-mixed-***@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Ben Bolker
2018-08-28 13:19:26 UTC
Permalink
Don't forget to run k.check() on your model to see if you specified a
large enough basis dimension to start with ...

On 2018-08-28 05:51 AM, Bansal, Udita wrote:
> Hi Dani,
>
> I don’t know much about GAM but I know you can look at the plots for fitted model results to check if there is any curvature. You can use the following code:
>
> par(mfrow = c(1,3))
> plot(GAMmodel)
>
> Bests
> Udita
>
> On 28/08/18, 1:58 AM, "R-sig-mixed-models on behalf of dani" <r-sig-mixed-models-***@r-project.org on behalf of ***@live.com> wrote:
>
> Hi everyone,
>
>
> I have a question about a GAM model where I included three non-parametric terms. I obtained the results below. can I conclude that the associations were in fact linear and run a final GLM model without including splines? To me it seems unnecessary to include splines in the final model. How should I report these results?
>
>
> # Approximate significance of smooth terms:
> # edf Ref.df Chi.sq p-value
> # s(x1) 1.61 2.01 1.17 0.550
> # s(x2) 1.00 1.00 0.00 0.955
> # s(x3) 1.00 1.00 4.61 0.032 *
>
> Thank you very much,
> Dani
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-***@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> _______________________________________________
> R-sig-mixed-***@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
dani
2018-08-29 17:38:44 UTC
Permalink
Thank you very much Udita and Dr. Bolker for your responses.

It is still not clear to me how should I proceed. Would anyone else be able help with this issue,?

Best regards,

Dani


Sent from Outlook<http://aka.ms/weboutlook>


________________________________
From: R-sig-mixed-models <r-sig-mixed-models-***@r-project.org> on behalf of Ben Bolker <***@gmail.com>
Sent: Tuesday, August 28, 2018 6:19 AM
To: r-sig-mixed-***@r-project.org
Subject: Re: [R-sig-ME] question about a GAM model



Don't forget to run k.check() on your model to see if you specified a
large enough basis dimension to start with ...

On 2018-08-28 05:51 AM, Bansal, Udita wrote:
> Hi Dani,
>
> I don’t know much about GAM but I know you can look at the plots for fitted model results to check if there is any curvature. You can use the following code:
>
> par(mfrow = c(1,3))
> plot(GAMmodel)
>
> Bests
> Udita
>
> On 28/08/18, 1:58 AM, "R-sig-mixed-models on behalf of dani" <r-sig-mixed-models-***@r-project.org on behalf of ***@live.com> wrote:
>
> Hi everyone,
>
>
> I have a question about a GAM model where I included three non-parametric terms. I obtained the results below. can I conclude that the associations were in fact linear and run a final GLM model without including splines? To me it seems unnecessary to include splines in the final model. How should I report these results?
>
>
> # Approximate significance of smooth terms:
> # edf Ref.df Chi.sq p-value
> # s(x1) 1.61 2.01 1.17 0.550
> # s(x2) 1.00 1.00 0.00 0.955
> # s(x3) 1.00 1.00 4.61 0.032 *
>
> Thank you very much,
> Dani
>
>
>
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-***@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
>
> _______________________________________________
> R-sig-mixed-***@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
dani
2018-08-29 17:46:20 UTC
Permalink
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?


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.


Thank you!

Best,

Dani

[[alternative HTML version deleted]]
Loading...