anova

scope from add1()-command in R

可紊 提交于 2019-12-25 04:57:13
问题 I am not sure how to use the add1 command. Suppose I have a model y=b0+b1*x1 and I would like to know if it would be a better fit to add more independent variables. Now I would test all models y=b0+b1*x1+b2*x2 with different x2 (my different independent variables). The add1 command somehow needs a "scope". I am not sure of, what that is. I could not find out how to use the add1 command. If I do this: add1(fittedmodel) I get an error, so I suppose I need to specify which variable I want to use

Error in vcov.default(mod) : there is no vcov() method for models of class list (changing from type I to type III Sum of Squares)

◇◆丶佛笑我妖孽 提交于 2019-12-24 19:16:47
问题 I am trying to get an ANOVA table for my split-split plot design where it will use type III Sum sq instead of type I. This is what I have done so far; > Attach(Data) > library(car) > options(contrasts = c("contr.sum", "contr.poly")) > mod <- aov(Response ~ A*B*C + Error(Block/A/B/C)) > Anova(mod, type='III') Error in vcov.default(mod) : there is no vcov() method for models of class aovlist, listof I don't understand why I keep getting this error message, or what to do about it. Any help

Holm sidak adjustment using R

蓝咒 提交于 2019-12-24 11:28:13
问题 I am very new to using R. I'm running an ANOVA with two factors (interaction) with success. Next I would like to conduct between groups comparisons. I know this is possible using the TukeyHSD command. However, our research group has previously used SigmaPlot to run statistics, which uses the Holm-Sidak method. So my supervisor would like me to run Holm-Sidak on R so that we can compare results and make sure they're the same. Does anyone know how to do this? I've tried searching online and can

summary.lm output when using aov in R

杀马特。学长 韩版系。学妹 提交于 2019-12-23 20:09:06
问题 Related Bounty: 250 reputation points. I have a question regarding summary.lm() output. Firstly, here is reproducible code for my data set: Cond_Per_Row_stats<-structure(list(Participant = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 1L, 2L,

How do I use the reshape() function more than once successfully in R? [duplicate]

风流意气都作罢 提交于 2019-12-23 19:28:08
问题 This question already has answers here : Reshaping multiple sets of measurement columns (wide format) into single columns (long format) (7 answers) Closed 2 years ago . This is my dataframe: ID Group x1 x2 x3 y1 y2 y3 z1 z2 z3 144 1 566 613 597 563 549 562 599 82 469 167 2 697 638 756 682 695 693 718 82 439.5 247 4 643 698 730 669 656 669 698 82 514.5 317 4 633 646 641 520 543 586 559 82 405.5 344 3 651 678 708 589 608 615 667 82 514 352 2 578 702 671 536 594 579 591 82 467.5 382 1 678 690

parametric ANOVA with unequal variances

家住魔仙堡 提交于 2019-12-23 16:43:31
问题 I was wondering if there is a way in R to do an ANOVA with unequal variances? Imagine the following example: x <- c(10,11,15,8,16,12,20) y <- c(10,14,18,25,28,30,35) d <- c(x,y) f <- as.factor(c(rep("a",7), rep("b",7))) # Unequal variance: t.test(x,y)$p.value t.test(d~f)$p.value # Equal variance: t.test(x,y, var.equal=TRUE)$p.value t.test(d~f, var.equal=TRUE)$p.value anova(lm(d~f))[[5]] summary(aov(lm(d~f)))[[1]][5] summary(lm(d~f))[[4]][8] As you can see from this example the different ways

TukeyHSD adjusted P value is 0.0000000

China☆狼群 提交于 2019-12-23 15:10:56
问题 I just performed a factorial ANOVA, followed by the TukeyHSD post-test. Some of my adjusted P values from the TukeyHSD output are 0.0000000 . Can these P values really be zero? Or is this a rounding situation, and my true P value might be something like 1e-17, that is rounded to 0.0000000 . Are there any options for the TukeyHSD() function in R that will give output P-values that contain exponents? Here is a snippet of my output: TukeyHSD(fit) Tukey multiple comparisons of means 95% family

ANOVA error on R

半世苍凉 提交于 2019-12-23 12:35:26
问题 I get this error when I run an ANOVA on R: Warning messages: 1: In model.response(mf, "numeric") : using type = "numeric" with a factor response will be ignored 2: In Ops.factor(y, z$residuals) : ‘-’ not meaningful for factors I don't really understand what this means and haven't really found any explanation online for it. Here's what my ANOVA is: fit <- aov(PC1 ~ Type, data=dffinalSep) And here's the str() for my data frame: 'data.frame': 44 obs. of 4 variables: $ Name: Factor w/ 22 levels

How to set up balanced one-way ANOVA for lm()

会有一股神秘感。 提交于 2019-12-22 12:38:53
问题 I have data: dat <- data.frame(NS = c(8.56, 8.47, 6.39, 9.26, 7.98, 6.84, 9.2, 7.5), EXSM = c(7.39, 8.64, 8.54, 5.37, 9.21, 7.8, 8.2, 8), Less.5 = c(5.97, 6.77, 7.26, 5.74, 8.74, 6.3, 6.8, 7.1), More.5 = c(7.03, 5.24, 6.14, 6.74, 6.62, 7.37, 4.94, 6.34)) # NS EXSM Less.5 More.5 # 1 8.56 7.39 5.97 7.03 # 2 8.47 8.64 6.77 5.24 # 3 6.39 8.54 7.26 6.14 # 4 9.26 5.37 5.74 6.74 # 5 7.98 9.21 8.74 6.62 # 6 6.84 7.80 6.30 7.37 # 7 9.20 8.20 6.80 4.94 # 8 7.50 8.00 7.10 6.34 Each column gives data

Post-hoc tests for one-way ANOVA with Welch's correction in R

别说谁变了你拦得住时间么 提交于 2019-12-22 10:18:31
问题 I have run a one-way ANOVA test with welch's correction using oneway.test() in R, as I have data that violate the assumption of equal variance (transformations did not solve the problem). A simple data example: > dput(df) structure(list(Count = c(13, 14, 14, 12, 11, 13, 14, 15, 13, 12, 20, 15, 9, 5, 13, 14, 7, 17, 18, 14, 12, 12, 13, 14, 11, 10, 15, 14, 14, 13), Group = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,