When doing Anova using the car package,? I get a print warning that is
unexpected.? It seemingly involves have my flow cytometry factor levels
named CD271+ and CD171-.? But I am not sure this warning should be
intended behavior.? Any explanation about whether I'm doing something
wrong? Why can't I have CD271+ and CD271- as factor levels?? Its legal
text isn't it?
library(car) mod = aov(Viability ~ Treatment*Expression, data = dat1)
Anova(mod, type =2) Anova Table (Type II tests) Response: Viability Sum
Sq Df F value Pr(>F) Treatment 19447.3 3 9.2942 0.0002927 *** Expression
2669.8 1 3.8279 0.0621394 . Treatment:Expression 2226.3 3 1.0640
0.3828336 Residuals 16739.3 24 --- Signif. codes: 0 ?***? 0.001 ?**?
0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Warning messages: 1: In printHypothesis(L,
rhs, names(b)) : one or more coefficients in the hypothesis include
arithmetic operators in their names; the printed representation of the
hypothesis will be omitted 2: In printHypothesis(L, rhs, names(b)) : one
or more coefficients in the hypothesis include arithmetic operators in
their names; the printed representation of the hypothesis will be
omitted 3: In printHypothesis(L, rhs, names(b)) : one or more
coefficients in the hypothesis include arithmetic operators in their
names; the printed representation of the hypothesis will be omitted
The code to reproduce:
```
dat1 <-structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L,
????????????????????????????????????????????? 1L, 1L, 1L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L,
????????????????????????????????????????????? 3L, 3L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L), levels = c("Control",
"Dabrafenib", "Trametinib", "Combination"), class
= "factor"),
????????????????????? Expression = structure(c(2L, 2L, 2L, 2L, 2L, 1L,
1L, 1L,
?????????????????????????????????????????????? 1L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L,
?????????????????????????????????????????????? 1L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L), levels = c("CD271-",
"CD271+"), class = "factor"),
????????????????????? Viability = c(128.329809725159, 24.2360176821065,
76.3597924274457, 11.0128771862387, 21.4683836248318,
??????????????????????????????????? 140.784162982894, 87.4303286565443,
118.181818181818, 53.603690178743,
??????????????????????????????????? 51.2973284643475, 5.47760907168941,
27.1574091870075, 50.8360561214684,
??????????????????????????????????? 56.5250816836441, 28.6949836632712,
93.2731116663463, 71.900826446281,
??????????????????????????????????? 32.2314049586777, 24.2360176821065,
27.4649240822602, 24.0822602344801,
??????????????????????????????????? 26.542379396502, 30.693830482414,
27.772438977513, 13.4729963482606,
??????????????????????????????????? 8.24524312896406, 18.5469921199308,
13.9342686911397, 13.3192389006342,
??????????????????????????????????? 19.9308091485681, 17.6244474341726,
16.2406304055353)),
???????????????? row.names = c(NA,
?????????????????????????????? -32L),
???????????????? class = c("tbl_df", "tbl",
"data.frame"))
mod = aov(Viability ~ Treatment*Expression, data = dat1)
summary(mod)
library(car)
Anova(mod, type =2)
```
> sessionInfo() R version 4.3.1 (2023-06-16 ucrt) Platform:
x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build
25951) Matrix products: default locale: [1] LC_COLLATE=English_United
States.utf8 LC_CTYPE=English_United States.utf8
LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C
LC_TIME=English_United States.utf8 time zone: America/Chicago tzcode
source: internal attached base packages: [1] stats graphics grDevices
utils datasets methods base other attached packages: [1] car_3.1-2
carData_3.0-5 tidyr_1.3.0 readr_2.1.4 readxl_1.4.3 ggplot2_3.4.3
dplyr_1.1.3 loaded via a namespace (and not attached): [1] crayon_1.5.2
vctrs_0.6.3 cli_3.6.1 rlang_1.1.1 purrr_1.0.2 generics_0.1.3
labeling_0.4.3 [8] bit_4.0.5 glue_1.6.2 colorspace_2.1-0 hms_1.1.3
scales_1.2.1 fansi_1.0.4 grid_4.3.1 [15] cellranger_1.1.0 abind_1.4-5
munsell_0.5.0 tibble_3.2.1 tzdb_0.4.0 lifecycle_1.0.3 compiler_4.3.1
[22] pkgconfig_2.0.3 rstudioapi_0.15.0 farver_2.1.1 R6_2.5.1
tidyselect_1.2.0 utf8_1.2.3 parallel_4.3.1 [29] vroom_1.6.3 pillar_1.9.0
magrittr_2.0.3 bit64_4.0.5 tools_4.3.1 withr_2.5.0 gtable_0.3.4
[[alternative HTML version deleted]]
The factor names are legal but the Warnings tell you pretty clearly that Car doesn't like such things. So why don't you just use something else that is more conventional. -- Bert On Sat, Sep 16, 2023 at 1:40?PM Robert Baer <rbaer at atsu.edu> wrote:> When doing Anova using the car package, I get a print warning that is > unexpected. It seemingly involves have my flow cytometry factor levels > named CD271+ and CD171-. But I am not sure this warning should be > intended behavior. Any explanation about whether I'm doing something > wrong? Why can't I have CD271+ and CD271- as factor levels? Its legal > text isn't it? > > library(car) mod = aov(Viability ~ Treatment*Expression, data = dat1) > Anova(mod, type =2) Anova Table (Type II tests) Response: Viability Sum > Sq Df F value Pr(>F) Treatment 19447.3 3 9.2942 0.0002927 *** Expression > 2669.8 1 3.8279 0.0621394 . Treatment:Expression 2226.3 3 1.0640 > 0.3828336 Residuals 16739.3 24 --- Signif. codes: 0 ?***? 0.001 ?**? > 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Warning messages: 1: In printHypothesis(L, > rhs, names(b)) : one or more coefficients in the hypothesis include > arithmetic operators in their names; the printed representation of the > hypothesis will be omitted 2: In printHypothesis(L, rhs, names(b)) : one > or more coefficients in the hypothesis include arithmetic operators in > their names; the printed representation of the hypothesis will be > omitted 3: In printHypothesis(L, rhs, names(b)) : one or more > coefficients in the hypothesis include arithmetic operators in their > names; the printed representation of the hypothesis will be omitted > > > The code to reproduce: > > ``` > > > dat1 <-structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L, > 1L, 1L, 1L, 2L, 2L, 2L, > 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, > 3L, 3L, 4L, 4L, 4L, 4L, > 4L, 4L, 4L, 4L), levels = c("Control", > "Dabrafenib", "Trametinib", "Combination"), class = "factor"), > Expression = structure(c(2L, 2L, 2L, 2L, 2L, 1L, > 1L, 1L, > 1L, 2L, 2L, 2L, 2L, 1L, > 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, > 1L, 2L, 2L, 2L, 2L, 1L, > 1L, 1L, 1L), levels = c("CD271-", > "CD271+"), class = "factor"), > Viability = c(128.329809725159, 24.2360176821065, > 76.3597924274457, 11.0128771862387, 21.4683836248318, > 140.784162982894, 87.4303286565443, > 118.181818181818, 53.603690178743, > 51.2973284643475, 5.47760907168941, > 27.1574091870075, 50.8360561214684, > 56.5250816836441, 28.6949836632712, > 93.2731116663463, 71.900826446281, > 32.2314049586777, 24.2360176821065, > 27.4649240822602, 24.0822602344801, > 26.542379396502, 30.693830482414, > 27.772438977513, 13.4729963482606, > 8.24524312896406, 18.5469921199308, > 13.9342686911397, 13.3192389006342, > 19.9308091485681, 17.6244474341726, > 16.2406304055353)), > row.names = c(NA, > -32L), > class = c("tbl_df", "tbl", "data.frame")) > > mod = aov(Viability ~ Treatment*Expression, data = dat1) > summary(mod) > library(car) > Anova(mod, type =2) > > ``` > > > > sessionInfo() R version 4.3.1 (2023-06-16 ucrt) Platform: > x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build > 25951) Matrix products: default locale: [1] LC_COLLATE=English_United > States.utf8 LC_CTYPE=English_United States.utf8 > LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C > LC_TIME=English_United States.utf8 time zone: America/Chicago tzcode > source: internal attached base packages: [1] stats graphics grDevices > utils datasets methods base other attached packages: [1] car_3.1-2 > carData_3.0-5 tidyr_1.3.0 readr_2.1.4 readxl_1.4.3 ggplot2_3.4.3 > dplyr_1.1.3 loaded via a namespace (and not attached): [1] crayon_1.5.2 > vctrs_0.6.3 cli_3.6.1 rlang_1.1.1 purrr_1.0.2 generics_0.1.3 > labeling_0.4.3 [8] bit_4.0.5 glue_1.6.2 colorspace_2.1-0 hms_1.1.3 > scales_1.2.1 fansi_1.0.4 grid_4.3.1 [15] cellranger_1.1.0 abind_1.4-5 > munsell_0.5.0 tibble_3.2.1 tzdb_0.4.0 lifecycle_1.0.3 compiler_4.3.1 > [22] pkgconfig_2.0.3 rstudioapi_0.15.0 farver_2.1.1 R6_2.5.1 > tidyselect_1.2.0 utf8_1.2.3 parallel_4.3.1 [29] vroom_1.6.3 pillar_1.9.0 > magrittr_2.0.3 bit64_4.0.5 tools_4.3.1 withr_2.5.0 gtable_0.3.4 > > > [[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]]
On Sat, 16 Sep 2023 15:39:49 -0500 Robert Baer <rbaer at atsu.edu> wrote:> When doing Anova using the car package,? I get a print warning that > is unexpected.? It seemingly involves have my flow cytometry factor > levels named CD271+ and CD171-.? But I am not sure this warning > should be intended behavior.? Any explanation about whether I'm doing > something wrong? Why can't I have CD271+ and CD271- as factor levels? > Its legal text isn't it? > > library(car) mod = aov(Viability ~ Treatment*Expression, data = dat1) > Anova(mod, type =2) Anova Table (Type II tests) Response: Viability > Sum Sq Df F value Pr(>F) Treatment 19447.3 3 9.2942 0.0002927 *** > Expression 2669.8 1 3.8279 0.0621394 . Treatment:Expression 2226.3 3 > 1.0640 0.3828336 Residuals 16739.3 24 --- Signif. codes: 0 ?***? > 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Warning messages: 1: In > printHypothesis(L, rhs, names(b)) : one or more coefficients in the > hypothesis include arithmetic operators in their names; the printed > representation of the hypothesis will be omitted 2: In > printHypothesis(L, rhs, names(b)) : one or more coefficients in the > hypothesis include arithmetic operators in their names; the printed > representation of the hypothesis will be omitted 3: In > printHypothesis(L, rhs, names(b)) : one or more coefficients in the > hypothesis include arithmetic operators in their names; the printed > representation of the hypothesis will be omitted > > > The code to reproduce: > > ``` > > > dat1 <-structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L, > ????????????????????????????????????????????? 1L, 1L, 1L, 2L, 2L, > 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, > ????????????????????????????????????????????? 3L, 3L, 4L, 4L, 4L, > 4L, 4L, 4L, 4L, 4L), levels = c("Control", > "Dabrafenib", "Trametinib", "Combination"), class = "factor"), > ????????????????????? Expression = structure(c(2L, 2L, 2L, 2L, 2L, > 1L, 1L, 1L, > ?????????????????????????????????????????????? 1L, 2L, 2L, 2L, 2L, > 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, > ?????????????????????????????????????????????? 1L, 2L, 2L, 2L, 2L, > 1L, 1L, 1L, 1L), levels = c("CD271-", > "CD271+"), class = "factor"), > ????????????????????? Viability = c(128.329809725159, > 24.2360176821065, 76.3597924274457, 11.0128771862387, > 21.4683836248318, 140.784162982894, 87.4303286565443, > 118.181818181818, 53.603690178743, > ??????????????????????????????????? 51.2973284643475, > 5.47760907168941, 27.1574091870075, 50.8360561214684, > ??????????????????????????????????? 56.5250816836441, > 28.6949836632712, 93.2731116663463, 71.900826446281, > ??????????????????????????????????? 32.2314049586777, > 24.2360176821065, 27.4649240822602, 24.0822602344801, > ??????????????????????????????????? 26.542379396502, > 30.693830482414, 27.772438977513, 13.4729963482606, > ??????????????????????????????????? 8.24524312896406, > 18.5469921199308, 13.9342686911397, 13.3192389006342, > ??????????????????????????????????? 19.9308091485681, > 17.6244474341726, 16.2406304055353)), > ???????????????? row.names = c(NA, > ?????????????????????????????? -32L), > ???????????????? class = c("tbl_df", "tbl", "data.frame")) > > mod = aov(Viability ~ Treatment*Expression, data = dat1) > summary(mod) > library(car) > Anova(mod, type =2) > > ```There seems to be something wrong in your presentation of the data. When I copied and pasted the code I got an error:> Error: unexpected input in: > "dat1 <-structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L, > ?"I don't really understand the provenance of the error, but after some fiddling around I managed to create a structure "dat1":> dput(dat1) > structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L, > 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, > 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), levels = c("Control", > "Dabrafenib", "Trametinib", "Combination"), class = "factor"), > Expression = structure(c(2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, > 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, > 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L), levels = c("CD271-", > "CD271+"), class = "factor"), Viability = c(128.329809725159, > 24.2360176821065, 76.3597924274457, 11.0128771862387, > 21.4683836248318, 140.784162982894, 87.4303286565443, > 118.181818181818, 53.603690178743, 51.2973284643475, > 5.47760907168941, 27.1574091870075, 50.8360561214684, > 56.5250816836441, 28.6949836632712, 93.2731116663463, > 71.900826446281, 32.2314049586777, 24.2360176821065,> mod = aov(Viability ~ Treatment*Expression, data = dat1) > summary(mod) > library(car) > Anova(mod, type =2) > 27.4649240822602, 24.0822602344801, 26.542379396502, 30.693830482414, > 27.772438977513, 13.4729963482606, 8.24524312896406, > 18.5469921199308, 13.9342686911397, 13.3192389006342, > 9.9308091485681, 17.6244474341726, 16.2406304055353)), row.names > c(NA, -32L), class = c("tbl_df", "tbl", "data.frame"))Then doing> mod = aov(Viability ~ Treatment*Expression, data = dat1) > summary(mod) > library(car) > Anova(mod, type =2)produced> Df Sum Sq Mean Sq F value Pr(>F) > Treatment 3 20004 6668 9.553 0.000246 *** > Expression 1 2490 2490 3.568 0.071050 . > Treatment:Expression 3 2386 795 1.140 0.353142 > Residuals 24 16751 698 > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1> Anova Table (Type II tests) > > Response: Viability > Sum Sq Df F value Pr(>F) > Treatment 20003.9 3 9.5534 0.0002462 *** > Expression 2490.3 1 3.5679 0.0710500 . > Treatment:Expression 2386.1 3 1.1395 0.3531420 > Residuals 16751.3 24 > --- > Signif. codes: 0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1No apparent problems that I can discern. No warnings. cheers, Rolf Turner P.S.> sessionInfo() > R version 4.3.1 (2023-06-16) > Platform: x86_64-pc-linux-gnu (64-bit) > Running under: Ubuntu 22.04.3 LTS > > Matrix products: default > BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3 > LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3; LAPACK > version 3.10.0 > > locale: > [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C > [3] LC_TIME=en_NZ.UTF-8 LC_COLLATE=en_GB.UTF-8 > [5] LC_MONETARY=en_NZ.UTF-8 LC_MESSAGES=en_GB.UTF-8 > [7] LC_PAPER=en_NZ.UTF-8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_NZ.UTF-8 LC_IDENTIFICATION=C > > time zone: Pacific/Auckland > tzcode source: system (glibc) > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > > other attached packages: > [1] car_3.0-7 carData_3.0-3 brev_0.0-8 > > loaded via a namespace (and not attached): > [1] compiler_4.3.1 crayon_1.5.2 brio_1.1.3 zip_2.1.1 > [5] Rcpp_1.0.8.3 callr_3.7.3 readxl_1.3.1 > fastmap_1.1.1 [9] R6_2.5.1 openxlsx_4.1.4 curl_5.0.0 > forcats_0.5.0 [13] tibble_3.2.1 desc_1.4.2 > rprojroot_2.0.3 nnet_7.3-19 [17] pillar_1.9.0 rlang_1.1.1 > utf8_1.2.3 testthat_3.1.3 [21] stringi_1.7.8 cachem_1.0.8 > fs_1.6.2 pkgload_1.2.4 [25] eglhmm_0.0-15 > memoise_2.0.1 cli_3.6.1 withr_2.5.0 [29] magrittr_2.0.3 > ps_1.7.5 rio_0.5.29 processx_3.8.1 [33] haven_2.2.0 > hms_1.1.3 remotes_2.4.2 devtools_2.4.2 [37] > lifecycle_1.0.3 vctrs_0.6.2 prettyunits_1.1.1 glue_1.6.2 [41] > data.table_1.12.8 cellranger_1.1.0 sessioninfo_1.2.2 abind_1.4-5 > [45] pkgbuild_1.4.0 fansi_1.0.4 colorspace_1.4-1 > foreign_0.8-79 [49] purrr_0.3.4 pkgconfig_2.0.3 tools_4.3.1 > usethis_2.0.1 [53] ellipsis_0.3.2R.T. -- Honorary Research Fellow Department of Statistics University of Auckland Stats. Dep't. (secretaries) phone: +64-9-373-7599 ext. 89622 Home phone: +64-9-480-4619
Dear Robert,
Anova() calls linearHypothesis(), also in the car package, to compute
sums of squares and df, supplying appropriate hypothesis matrices.
linearHypothesis() usually tries to express the hypothesis matrix in
symbolic equation form for printing, but won't do this if coefficient
names include arithmetic operators, in your case - and +, which can
confuse it.
The symbolic form of the hypothesis isn't really relevant for Anova(),
which doesn't use the printed representation of each hypothesis, and so,
despite the warnings, you get the correct ANOVA table. In your case,
where the data are balanced, with 4 cases per cell, Anova(mod) and
summary(mod) are equivalent, which makes me wonder why you would use
Anova() in the first place.
To elaborate a bit, linearHypothesis() does tolerate arithmetic
operators in coefficient names if you specify the hypothesis
symbolically rather than as a hypothesis matrix. For example, to test,
the interaction:
------- snip --------
> linearHypothesis(mod,
+ c("TreatmentDabrafenib:ExpressionCD271+ = 0",
+ "TreatmentTrametinib:ExpressionCD271+ = 0",
+ "TreatmentCombination:ExpressionCD271+ = 0"))
Linear hypothesis test
Hypothesis:
TreatmentDabrafenib:ExpressionCD271+ = 0
TreatmentTrametinib:ExpressionCD271+ = 0
TreatmentCombination:ExpressionCD271+ = 0
Model 1: restricted model
Model 2: Viability ~ Treatment * Expression
Res.Df RSS Df Sum of Sq F Pr(>F)
1 27 18966
2 24 16739 3 2226.3 1.064 0.3828
------- snip --------
Alternatively:
------- snip --------
> H <- matrix(0, 3, 8)
> H[1, 6] <- H[2, 7] <- H[3, 8] <- 1
> H
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 0 0 0 0 0 1 0 0
[2,] 0 0 0 0 0 0 1 0
[3,] 0 0 0 0 0 0 0 1
> linearHypothesis(mod, H)
Linear hypothesis test
Hypothesis:
Model 1: restricted model
Model 2: Viability ~ Treatment * Expression
Res.Df RSS Df Sum of Sq F Pr(>F)
1 27 18966
2 24 16739 3 2226.3 1.064 0.3828
Warning message:
In printHypothesis(L, rhs, names(b)) :
one or more coefficients in the hypothesis include
arithmetic operators in their names;
the printed representation of the hypothesis will be omitted
------- snip --------
There's no good reason that linearHypothesis() should try to express
each hypothesis symbolically for Anova(), since Anova() doesn't use that
information. When I have some time, I'll arrange to avoid the warning.
Best,
John
--
John Fox, Professor Emeritus
McMaster University
Hamilton, Ontario, Canada
web: https://www.john-fox.ca/
On 2023-09-16 4:39 p.m., Robert Baer wrote:> Caution: External email.
>
>
> When doing Anova using the car package, I get a print warning that is
> unexpected. It seemingly involves have my flow cytometry factor levels
> named CD271+ and CD171-. But I am not sure this warning should be
> intended behavior. Any explanation about whether I'm doing something
> wrong? Why can't I have CD271+ and CD271- as factor levels? Its legal
> text isn't it?
>
> library(car) mod = aov(Viability ~ Treatment*Expression, data = dat1)
> Anova(mod, type =2) Anova Table (Type II tests) Response: Viability Sum
> Sq Df F value Pr(>F) Treatment 19447.3 3 9.2942 0.0002927 *** Expression
> 2669.8 1 3.8279 0.0621394 . Treatment:Expression 2226.3 3 1.0640
> 0.3828336 Residuals 16739.3 24 --- Signif. codes: 0 ?***? 0.001 ?**?
> 0.01 ?*? 0.05 ?.? 0.1 ? ? 1 Warning messages: 1: In printHypothesis(L,
> rhs, names(b)) : one or more coefficients in the hypothesis include
> arithmetic operators in their names; the printed representation of the
> hypothesis will be omitted 2: In printHypothesis(L, rhs, names(b)) : one
> or more coefficients in the hypothesis include arithmetic operators in
> their names; the printed representation of the hypothesis will be
> omitted 3: In printHypothesis(L, rhs, names(b)) : one or more
> coefficients in the hypothesis include arithmetic operators in their
> names; the printed representation of the hypothesis will be omitted
>
>
> The code to reproduce:
>
> ```
>
>
> dat1 <-structure(list(Treatment = structure(c(1L, 1L, 1L, 1L, 3L, 1L,
> 1L, 1L, 1L, 2L, 2L, 2L,
> 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L,
> 3L, 3L, 4L, 4L, 4L, 4L,
> 4L, 4L, 4L, 4L), levels = c("Control",
> "Dabrafenib", "Trametinib", "Combination"),
class = "factor"),
> Expression = structure(c(2L, 2L, 2L, 2L, 2L, 1L,
> 1L, 1L,
> 1L, 2L, 2L, 2L, 2L, 1L,
> 1L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L,
> 1L, 2L, 2L, 2L, 2L, 1L,
> 1L, 1L, 1L), levels = c("CD271-",
> "CD271+"), class = "factor"),
> Viability = c(128.329809725159, 24.2360176821065,
> 76.3597924274457, 11.0128771862387, 21.4683836248318,
> 140.784162982894, 87.4303286565443,
> 118.181818181818, 53.603690178743,
> 51.2973284643475, 5.47760907168941,
> 27.1574091870075, 50.8360561214684,
> 56.5250816836441, 28.6949836632712,
> 93.2731116663463, 71.900826446281,
> 32.2314049586777, 24.2360176821065,
> 27.4649240822602, 24.0822602344801,
> 26.542379396502, 30.693830482414,
> 27.772438977513, 13.4729963482606,
> 8.24524312896406, 18.5469921199308,
> 13.9342686911397, 13.3192389006342,
> 19.9308091485681, 17.6244474341726,
> 16.2406304055353)),
> row.names = c(NA,
> -32L),
> class = c("tbl_df", "tbl",
"data.frame"))
>
> mod = aov(Viability ~ Treatment*Expression, data = dat1)
> summary(mod)
> library(car)
> Anova(mod, type =2)
>
> ```
>
>
>> sessionInfo() R version 4.3.1 (2023-06-16 ucrt) Platform:
> x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 11 x64 (build
> 25951) Matrix products: default locale: [1] LC_COLLATE=English_United
> States.utf8 LC_CTYPE=English_United States.utf8
> LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C
> LC_TIME=English_United States.utf8 time zone: America/Chicago tzcode
> source: internal attached base packages: [1] stats graphics grDevices
> utils datasets methods base other attached packages: [1] car_3.1-2
> carData_3.0-5 tidyr_1.3.0 readr_2.1.4 readxl_1.4.3 ggplot2_3.4.3
> dplyr_1.1.3 loaded via a namespace (and not attached): [1] crayon_1.5.2
> vctrs_0.6.3 cli_3.6.1 rlang_1.1.1 purrr_1.0.2 generics_0.1.3
> labeling_0.4.3 [8] bit_4.0.5 glue_1.6.2 colorspace_2.1-0 hms_1.1.3
> scales_1.2.1 fansi_1.0.4 grid_4.3.1 [15] cellranger_1.1.0 abind_1.4-5
> munsell_0.5.0 tibble_3.2.1 tzdb_0.4.0 lifecycle_1.0.3 compiler_4.3.1
> [22] pkgconfig_2.0.3 rstudioapi_0.15.0 farver_2.1.1 R6_2.5.1
> tidyselect_1.2.0 utf8_1.2.3 parallel_4.3.1 [29] vroom_1.6.3 pillar_1.9.0
> magrittr_2.0.3 bit64_4.0.5 tools_4.3.1 withr_2.5.0 gtable_0.3.4
>
>
> [[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.