tag:blogger.com,1999:blog-1442302563171663500.post2305148902357719264..comments2023-10-14T15:58:07.881+02:00Comments on R tutorial for Spatial Statistics: Linear Models (lm, ANOVA and ANCOVA) in AgricultureFabio Veronesihttp://www.blogger.com/profile/07827549157455488947noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-1442302563171663500.post-11401976848078687112017-11-12T16:09:52.361+01:002017-11-12T16:09:52.361+01:00Hi Fabio,
I found very helpful and thank for sha...Hi Fabio, <br /><br />I found very helpful and thank for sharing. Could you share us the script you've used to to create the 3d bar in briefing two way interaction. I have one question about result intercept in Anova function lm with one factor - what does the intercept indicate or represent for?<br /><br />Thank you again<br /><br />SadikAnonymoushttps://www.blogger.com/profile/03058421268213648570noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-85857240455640579922017-07-04T10:23:45.094+02:002017-07-04T10:23:45.094+02:00Hi Helena,
The first question is related to the in...Hi Helena,<br />The first question is related to the independence of the errors, please look at this document for more info: http://www.biostat.jhsph.edu/~iruczins/teaching/jf/ch5.pdf<br /><br />In regards to the second question you can take a look here:<br />http://www.theanalysisfactor.com/mixed-models-predictor-both-fixed-random/<br /><br />These two documents should answer your questions. However, if you still have doubts please do not hesitate to continue the conversation. <br /><br />Cheers,<br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-44349213015459685662017-07-03T23:25:25.547+02:002017-07-03T23:25:25.547+02:00Hi Fabio,
Thank you for your post, very helpful.
...Hi Fabio,<br /><br />Thank you for your post, very helpful.<br />My comment is also on one of the assumptions of the linear model.<br />You mention the independence of the data, andI believe that when we talk about the independence of the data we talk about the independence of the explanation variables vs the response variable. But you tested independence on the coefficients. In fact, you do that using the "correlation of coefficients" what is new to me, and I cannot understand. Coefficients are constants, how is that correlation calculated? Would really appreciate if you could help me understand it.<br />My second comment is another question, on the random intercept and slope for repeated measures you include on model lme2 the variable year, why? don't you want only the random effect? this way you get also a fixed effect for year, don't you?<br /><br />Thank you for your post and in advance for your help.<br />Helena <br />Anonymoushttps://www.blogger.com/profile/17298072193157167007noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-35054900703998801752017-06-29T14:30:54.635+02:002017-06-29T14:30:54.635+02:00Hi Walter,
Thank you for the comment. I love this ...Hi Walter,<br />Thank you for the comment. I love this discussion because it is one of the thing that confused me when I was collecting data to write the post.<br /><br />I wonder if by "all underlying population" they mean normality within groups, so split between men and women and then check for normality separately. <br /><br />Many thanks,<br />Fabio<br /><br />Fabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-76199082418446107622017-06-29T13:32:07.961+02:002017-06-29T13:32:07.961+02:00Hi Fabio,
I agree with Stephen. A lot of stuff mak...Hi Fabio,<br />I agree with Stephen. A lot of stuff makes it into scholarly books. I think it stems from some early confusion with the shape of a sampling distribution. The authors mentioned above are not the only ones.<br /><br />Imagine the distribution of shoe sizes in the population. I assume those are not distributed normally, since women -even this of the same height as men- seem to have smaller shoe sizes. The distribution seems to be some kind of bimodal in the population. Having height as a predictor will produce a weaker residual fit than a model that includes gender as well and reaches an even better distribution of the residuals, when the interaction is included.<br /><br />Comments of this kind to text book authors usually yielded an answer like: "Well, thinking of it..." or they referred me to the textbooks where they had learned it from.<br /><br />Let us spread the word....<br /><br />All the best, Walter.Anonymoushttps://www.blogger.com/profile/02931332636282001492noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-75541017085967977452017-06-29T09:52:32.961+02:002017-06-29T09:52:32.961+02:00Hi Stephen,
Thank you very much for reading my pos...Hi Stephen,<br />Thank you very much for reading my post and for your comment.<br />You are right to mention the normality of the residuals and I show the code to do that when I talk about two-factors ANOVA. <br />In regards to the normality of the response, it is my understanding that this is one of the assumption of ANOVA. In Witte and Witte the authors say, under the section Assumptions: "All Underlying populations are assumed to be normally distributed, with equal variances". <br /><br />Many thanks,<br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-44871518303483821972017-06-28T21:52:15.077+02:002017-06-28T21:52:15.077+02:00You should not be checking for normality of the re...You should not be checking for normality of the response, yield, (lasrosas.corn$yield). In a linear model, the error term is supposed to be normally distributed with zero mean. The response has mean Xbeta. The methods (hist, qqnorm) you use to assess normality of the response assume a constant mean. You should apply those techniques to the residuals.<br /><br />To see this, try:<br />set.seed(23)<br />y <- rnorm(500, mean=c(1, 3, 9, 15))<br />hist(y)<br />qqnorm(y)<br />qqline(y)Anonymoushttps://www.blogger.com/profile/14754112396440200496noreply@blogger.com