Hi,

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")


What is wrong with the first syntax. I have seen many scripts that the R
users have applied any function (log, -, ...) directly inside the
formulation. 

It will help me to understand the grammar of R.

Thank you.
Saeed




-- 
View this message in context: 
http://www.nabble.com/Syntax-in-taking-log-to-transfrom-the-data-to-fit-Gaussian-distribution-tp22179656p22179656.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@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.

Reply via email to