[R] re gression trees: mean square vs. absolute errors

2008-03-25 Thread lubaroz
Hi, I am working with CART regression now. Could anyone tell me in which cases it is better to use mean square error for splitting nodes and when mean absolute error should be preferred. I am now using the default (MSE) version and I can see that the obtained optimal tree is very different from th

[R] scale estimation for Gamma distribution

2007-12-19 Thread lubaroz
Hey, I make a regression for Gamma distribution with log link, in R and in SAS. In R, the dispersion is estimated by \phi=Deviance/(#_of_observations), In SAS, there are two options: \phi=Deviance/(#_of_observations-#_of_params) or \phi=Pearson/(#_of_observations-#_of_params). I understand that

Re: [R] GAM with constraints

2007-11-28 Thread lubaroz
Simon Wood-4 wrote: > > Are you interested in equality constraints or inequality constraints? > No, I am interested in 2 kinds of inequality constraints: 1) monotonic splines 2) positive coefficients of the variables, which are not splines. It seems that pcls should be able to deal with both o

[R] GAM with constraints

2007-11-25 Thread lubaroz
Hi, I am trying to build GAM with linear constraints, for a general link function, not only identity. If I understand it correctly, the function pcls() can solve the problem, if the smoothness penalties are given. What I need is to incorporate the constraints before calculating the penalties. Can