[R] Finding parameters for residuals using GAMLSS and a lognormal dist.

Chris89 chrisege at stud.ntnu.no
Tue Jul 16 11:42:36 CEST 2013


Hi everyone!

First of all: I am new to the forum, so please excuse my lack of knowledge
on how to post a question...

I am working on a project where I need to use the GAMLSS package, and the
boss have asked me to try using the lognormal distribution. 
The regression goes as planned, but when evaluating the residuals and using
the coef() function, I get multiple coefficients as theory says, but I´m not
sure if they can be used as parameters.

My question is: How can I model the residuals? Do I have to assume a
lognormal distribution of these, or can I assume a distribution of choice? 
I have plotted the kernel density of the residuals and they do seem to fit a
lognormal distribution, but as I am not entirely sure how to find
parameters, I do not know how... I guess this is an easy question, but I
just cant seem to find a solution to this.

A section of the code:
tmpformula = as.formula(paste(logvarnames[i]," ~ ",
paste(logvarnames[1:i-1], collapse= "+")))
res = gamlss(tmpformula, family = LOGNO(), data = myall )

where logvarnames[] is a vector containing the names of columns  from the
dataset I use called "myall". 





--
View this message in context: http://r.789695.n4.nabble.com/Finding-parameters-for-residuals-using-GAMLSS-and-a-lognormal-dist-tp4671674.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list