[R] Syntax in taking log to transfrom the data to fit Gaussian distribution

Saeed Ahmadi ahmadi_saeed at yahoo.com
Tue Feb 24 13:00:47 CET 2009

In order ot see if any of these syntaxes work or not, I made the QQ plot.
Attached files are showing the QQ plots made when log was inside the model
formulation and outside teh model formulation. You can see that when
transformation were done outside, then I have a general better QQ plot
(straight line fitted to the data).


Philipp Pagel-5 wrote:
> On Tue, Feb 24, 2009 at 02:46:07AM -0800, Saeed Ahmadi wrote:
>> I have a data set (weight) that does not follow the Gaussian (Normal)
>> distribution. However, I have to transform the data before applying the
>> Gaussian distribution. I used this syntax and used log(weight) as:
>> posJy.model<-glm(log(weight) ~ factor(pos),
>> family=gaussian(link='identity'), subset=Soil=="Jy"). This syntax COULD
>> NOT
>> transform the data. But if I transform the data before applying the
>> model,
>> then it works. The syntax is: 
>> weight<-log(weight)
>> posJy.model<-glm(weight ~ factor(pos), family=gaussian(link='identity'),
>> subset=Soil=="Jy")
> That should work. Maybe you should tell us what happened or why you
> think it didn't work. Error messages? Unexpected results?
> cu
> 	Philipp
> -- 
> Dr. Philipp Pagel
> Lehrstuhl für Genomorientierte Bioinformatik
> Technische Universität München
> Wissenschaftszentrum Weihenstephan
> 85350 Freising, Germany
> http://mips.gsf.de/staff/pagel
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/Syntax-in-taking-log-to-transfrom-the-data-to-fit-Gaussian-distribution-tp22179656p22180394.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list