Dear R-Users,

I am fairly new to R and got in trouble by understanding how to run a GAM
using penalized regression splines with 4 degress of freedom (even by
reading the R Documentation).

 

I tried the following: 

>  gamreg1.2<-gam(num_FCRlong ~ s(GDP,df=4)+s(cupol_GDPpCapita,df=4)

+                              +s(fort_budget,df=4)+s(fort_percentDebt,
df=4)

+                              +s(linpol_primSurplus,df=4)+s(Inflation,df=4)

+                              +s(lagBYmean,df=4),

+                  data = data.plm)

Fehler in o[, i] <- junk$o : 

  Anzahl der zu ersetzenden Elemente ist kein Vielfaches der Ersetzungslänge

 

If I remove 

     +s(lagBYmean,df=4),

It works.

 

So I do not really understand why this is the case and what I am actually
doing wrong. 

Further I am even not sure, if this is the right code at all. 

Will I receive run a GAM using penalized regression splines with 4 degress
of freedom by this code? 

 

Thanks for your help and have a nice day! 
Katie

 

 

 


	[[alternative HTML version deleted]]

