[R] GAM P value (package mgcv)

Jason 林俊 j@@ono@|c @end|ng |rom 163@com
Thu Jun 27 01:34:59 CEST 2019


Dear R-helpers,


My system: R 3.5.3 osx, mgcv 1.8-28


I try to build a model for five parameters


Model = gam( Y ~ s(x1) + s(x2) + s(x3) + s(x4) + s(x5))


But, We found these five parameters have multicollinearity. We observed a significant correlation between these parameters. So, we performed a PCA to convert the set of five correlated air pollution variables into a set of linearly uncorrelated main variations.  (PC1 and PC2)


Then, we build the new GAM model using these two main variations as predictor variables.


Model = gam( Y ~ s(PC1) + s(PC2))


Then, we can obtain the P value of PC1 and PC2.


Approximate significance of smooth terms:
         edf Ref.df Chi.sq p-value
s(PC1) 8.892  8.996  57402  <2e-16 ***
s(PC2) 8.978  9.000  15125  <2e-16 ***


 But, we still cannot find out a way to calculate the P value for the original five parameter.
 


Jason / Lin Jun


	[[alternative HTML version deleted]]



More information about the R-help mailing list