![]() Then all factors are indicated by letters (a, b, c) and all levels by numbers (a1, a2, a3).įor the 2x3 design we have been using as an example, where there are 2 factors (condition and time of measurement), the first with 2 levels (placebo vs. medicine) and the second with three levels (time1, time2, and time3) we would enter the labels as follows:Ĭ(“condition”, “placebo”, “medicine”, “time”, “time1”, “time2”, “time3”)Īs you can see, you follow the order of the design ( 2b*3w), and first write the FACTOR label (condition) followed by the levels of that factor (placebo and medicine). You can also choose not to specify names. ![]() You can enter the labels in the ‘labelnames’ variable. To make sure the plots and tables with simulation results are easy to interpret, it really helps to name all factors and levels. The plot below visualizes means from 1 to 8 being entered in a vector: mu = c(1, 2, 3, 4, 5, 6, 7, 8) so you can see how the basic ordering works. Within the first 4 means, the first 2 correspond to level 1 of factor 2, and within those 2 means, the first corresponds to level 1 of factor 3. So if you enter the means 1, 2, 3, 4, 5, 6, 7, 8 the first 4 means correspond to level 1 of factor 1, the second 4 means correspond to level 2 of factor 1. Means are entered in the following order for a 3 factors design (each with 2 levels): For more factors, note the general pattern in the example below. If your design has just one factor, just enter the means in the same order as the labelnames (see below). Levels are indicated by factor names and levels (e.g., control_time1, control_time2, control_time3, etc). The general principle is that the code generates factors, indicated by the factor names you entered in the labelnames variable, (i.e., condition and time). Always carefully check if the plot that is generated matches your expectations. ANOVA_design outputs a plot so you can check if you entered all means as you intended. Means need to be entered in the correct order. Thus, for a "2b*3w" design, 6 means need to be entered. Note that for each cell in the design, a mean must be provided.
0 Comments
Leave a Reply. |