Hi eveyone, I'm studying about variance (ANOVA) in R and have some questions to share. I read an article investigating the effect of factors (temperature, Asphalt content, Air voids, and sample thickness) on the hardness of asphalt concrete in the tensile test (abbreviated as Kic). Each condition was repeated four times (4 samples). In the paper, the authors used MINITAB to analyze Anova. The authors use "adjusted sums of squares" calculate the p-value I try to use ANOVA in R to analyze this data and get the result as shown in Figure 4. The results are different from the results in the article. Some papers say that in R, the default for ANOVA analysis is to use "sequential sums of squares" to calculate the p-value. So please help the following two questions: 1 / Introduction to code in R for anova analysis uses "adjusted sums of squares". The main part of the command in R / myself is as follows: > Tem = as.factor (temperature) > Ac as.factor (AC) > Av = as.factor (AV) > Thick = as.factor (Thickness) > Twoway = lm (KIC ~ Tem + Ac + Av + Thick + Stamp + Ac + Stamp + Av + Stamp + Thick + Ac * Av + Ac * Thick + Av * Thick) > anova (twoway) 2/ When to use "sequential sums of squares" and when to use "adjusted sums of squares". Some papers recommend using the "oa.design <https://www.youtube.com/redirect?q=http%3A%2F%2Foa.design%2F&redir_token=AaSAPDY-5UAsoHxN6BdwfyIJ7R98MTUzOTIxNDg2OUAxNTM5MTI4NDY5&event=comments>" function in R to check for "orthogonal" designs. If not, use "adjusted sums of squares". I am still vague about this command, so look forward to everyone's suggestion. If you could answer all two of my questions, I would be most grateful. Ps: I have added a CSV file and the paper for practicing R. http://www.mediafire.com/file/e5oe54p2c2wd4bc/Saha+research.csv http://www.mediafire.com/file/39jlf9h539y9mdz/Homothetic+behaviour+investigation+on+fracture+toughness+of+asphalt+mixtures+using+semicircular+bending+test.pdf [[alternative HTML version deleted]]
We cannot read your message. Should post pure text, not html. Hm, my phone now may post html, must try to stop. Your R code not legible. It seems to be output? Lines all run together. I tried find articles you mention, but "not found" resulted. You should use aov() for fitting, then get post hoc comparisons. In car package, Anova function will help. I may teach Anova soon, we'll see if I have better answer then. Paul Johnson University of Kansas On Wed, Oct 10, 2018, 1:14 AM Thanh Tran <masternhattt at gmail.com> wrote:> Hi eveyone, > I'm studying about variance (ANOVA) in R and have some questions to share. > I read an article investigating the effect of factors (temperature, Asphalt > content, Air voids, and sample thickness) on the hardness of asphalt > concrete in the tensile test (abbreviated as Kic). Each condition was > repeated four times (4 samples). In the paper, the authors used MINITAB to > analyze Anova. The authors use "adjusted sums of squares" calculate the > p-value I try to use ANOVA in R to analyze this data and get the result as > shown in Figure 4. The results are different from the results in the > article. Some papers say that in R, the default for ANOVA analysis is to > use "sequential sums of squares" to calculate the p-value. > So please help the following two questions: 1 / Introduction to code in R > for anova analysis uses "adjusted sums of squares". The main part of the > command in R / myself is as follows: > Tem = as.factor (temperature) > Ac > as.factor (AC) > Av = as.factor (AV) > Thick = as.factor (Thickness) > > Twoway = lm (KIC ~ Tem + Ac + Av + Thick + Stamp + Ac + Stamp + Av + Stamp > + Thick + Ac * Av + Ac * Thick + Av * Thick) > anova (twoway) 2/ When to > use "sequential sums of squares" and when to use "adjusted sums of > squares". Some papers recommend using the "oa.design > < > https://www.youtube.com/redirect?q=http%3A%2F%2Foa.design%2F&redir_token=AaSAPDY-5UAsoHxN6BdwfyIJ7R98MTUzOTIxNDg2OUAxNTM5MTI4NDY5&event=comments > >" > function in R to check for "orthogonal" designs. If not, use "adjusted sums > of squares". I am still vague about this command, so look forward to > everyone's suggestion. If you could answer all two of my questions, I would > be most grateful. Ps: I have added a CSV file and the paper for practicing > R. http://www.mediafire.com/file/e5oe54p2c2wd4bc/Saha+research.csv > > http://www.mediafire.com/file/39jlf9h539y9mdz/Homothetic+behaviour+investigation+on+fracture+toughness+of+asphalt+mixtures+using+semicircular+bending+test.pdf > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
Hi Tranh, I'm not sure why you are converting your variables to factors, and I think the model you want is: lm(KIC~temperature+AC+AV+Thickness+temperature:AC+ temperature:AV+temperature:thickness+AC:AV+ AC:thickness+AV:thickness,SR) Note the colons (:) rather than asterisks (*) for the interactions. Jim On Wed, Oct 10, 2018 at 5:14 PM Thanh Tran <masternhattt at gmail.com> wrote:> > Hi eveyone, > I'm studying about variance (ANOVA) in R and have some questions to share. > I read an article investigating the effect of factors (temperature, Asphalt > content, Air voids, and sample thickness) on the hardness of asphalt > concrete in the tensile test (abbreviated as Kic). Each condition was > repeated four times (4 samples). In the paper, the authors used MINITAB to > analyze Anova. The authors use "adjusted sums of squares" calculate the > p-value I try to use ANOVA in R to analyze this data and get the result as > shown in Figure 4. The results are different from the results in the > article. Some papers say that in R, the default for ANOVA analysis is to > use "sequential sums of squares" to calculate the p-value. > So please help the following two questions: 1 / Introduction to code in R > for anova analysis uses "adjusted sums of squares". The main part of the > command in R / myself is as follows: > Tem = as.factor (temperature) > Ac > as.factor (AC) > Av = as.factor (AV) > Thick = as.factor (Thickness) > > Twoway = lm (KIC ~ Tem + Ac + Av + Thick + Stamp + Ac + Stamp + Av + Stamp > + Thick + Ac * Av + Ac * Thick + Av * Thick) > anova (twoway) 2/ When to > use "sequential sums of squares" and when to use "adjusted sums of > squares". Some papers recommend using the "oa.design > <https://www.youtube.com/redirect?q=http%3A%2F%2Foa.design%2F&redir_token=AaSAPDY-5UAsoHxN6BdwfyIJ7R98MTUzOTIxNDg2OUAxNTM5MTI4NDY5&event=comments>" > function in R to check for "orthogonal" designs. If not, use "adjusted sums > of squares". I am still vague about this command, so look forward to > everyone's suggestion. If you could answer all two of my questions, I would > be most grateful. Ps: I have added a CSV file and the paper for practicing > R. http://www.mediafire.com/file/e5oe54p2c2wd4bc/Saha+research.csv > http://www.mediafire.com/file/39jlf9h539y9mdz/Homothetic+behaviour+investigation+on+fracture+toughness+of+asphalt+mixtures+using+semicircular+bending+test.pdf > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
Hi again, Two things, I named the data frame SR as shown in the model. The other is for those who may wish to answer the OP. The mediafire website is loaded with intrusive ads and perhaps malware. Jim On Thu, Oct 11, 2018 at 9:02 AM Jim Lemon <drjimlemon at gmail.com> wrote:> > Hi Tranh, > I'm not sure why you are converting your variables to factors, and I > think the model you want is: > > lm(KIC~temperature+AC+AV+Thickness+temperature:AC+ > temperature:AV+temperature:thickness+AC:AV+ > AC:thickness+AV:thickness,SR) > > Note the colons (:) rather than asterisks (*) for the interactions. > > Jim > On Wed, Oct 10, 2018 at 5:14 PM Thanh Tran <masternhattt at gmail.com> wrote: > > > > Hi eveyone, > > I'm studying about variance (ANOVA) in R and have some questions to share. > > I read an article investigating the effect of factors (temperature, Asphalt > > content, Air voids, and sample thickness) on the hardness of asphalt > > concrete in the tensile test (abbreviated as Kic). Each condition was > > repeated four times (4 samples). In the paper, the authors used MINITAB to > > analyze Anova. The authors use "adjusted sums of squares" calculate the > > p-value I try to use ANOVA in R to analyze this data and get the result as > > shown in Figure 4. The results are different from the results in the > > article. Some papers say that in R, the default for ANOVA analysis is to > > use "sequential sums of squares" to calculate the p-value. > > So please help the following two questions: 1 / Introduction to code in R > > for anova analysis uses "adjusted sums of squares". The main part of the > > command in R / myself is as follows: > Tem = as.factor (temperature) > Ac > > as.factor (AC) > Av = as.factor (AV) > Thick = as.factor (Thickness) > > > Twoway = lm (KIC ~ Tem + Ac + Av + Thick + Stamp + Ac + Stamp + Av + Stamp > > + Thick + Ac * Av + Ac * Thick + Av * Thick) > anova (twoway) 2/ When to > > use "sequential sums of squares" and when to use "adjusted sums of > > squares". Some papers recommend using the "oa.design > > <https://www.youtube.com/redirect?q=http%3A%2F%2Foa.design%2F&redir_token=AaSAPDY-5UAsoHxN6BdwfyIJ7R98MTUzOTIxNDg2OUAxNTM5MTI4NDY5&event=comments>" > > function in R to check for "orthogonal" designs. If not, use "adjusted sums > > of squares". I am still vague about this command, so look forward to > > everyone's suggestion. If you could answer all two of my questions, I would > > be most grateful. Ps: I have added a CSV file and the paper for practicing > > R. http://www.mediafire.com/file/e5oe54p2c2wd4bc/Saha+research.csv > > http://www.mediafire.com/file/39jlf9h539y9mdz/Homothetic+behaviour+investigation+on+fracture+toughness+of+asphalt+mixtures+using+semicircular+bending+test.pdf > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > 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.