APA7 STYLE OWL PURDE

User Generated

mrebcngn

Humanities

psyc3290

University of Fraser valley

Description

correct the apap7 style and whole docx should be double spaced

font Times new roman whole whole docx - 12 size

for appendix font should be courier new- 9 size

  • Font: The text should use Times New Roman, 12-point font and double spaced.
  • Margins: The left and right margins should be set to 1”.
  • grsph and table has to be in timesnew roman font.
  • font for appendix font should be courier new- 9 size

Unformatted Attachment Preview

T One Way Anova test Major Assignment 1 One Way Anova test Major Assignment1 University of Guelph PSYC *3290, Section # 0106 1 One Way Anova test Major Assignment 1 2 One Way Anova test Major Assignment 1 3 For this report, I examined the extent to which female ratings of male attractiveness varied as a result of the cologne used. Specifically, I hypothesized that males wearing the popular MovieStar cologne would be rated as more attractive than males wearing no cologne and preregistered this hypothesis on the Open Science Foundation (osf.io). All other analyses were exploratory. Forty individuals participated in this experiment and were randomly assigned to one of four groups (no cologne, NoName cologne, PopStar cologne, and MovieStar cologne), resulting in 10 individuals per group. A male confederate was instructed to wear the specified cologne and interact with the female participants. After the encounter with the male confederate, the female participants were asked to rate how attractive the male confederate was on a 10-point scale (1 = not at all attractive, 10 = extremely attractive). Results I examined the extent to which type of cologne (no cologne, NoName, PopStar and MovieStar) influenced male attractiveness rating using one-way analysis of variance. The results of the Levene’s test did not suggest population variances were different, Levene’s F (3, 36) = 1.15, p = .343. I found support for the planned comparison that the MovieStar cologne (M = 7.90, SD = 0.74, 95% CI [7.37, 8.43]) would result in higher male attractiveness ratings than no cologne (M = 4.90, SD = 0.88, 95% CI [4.27, 5.53]), Mdiff = 3.00 95% CI [2.24, 3.76], d = 3.71, 95% CI [2.20, 5.17], t(18) = 8.29, p < .001 (one- tailed). This was a large effect by Cohen’s (1988) standards and the bounds of the d-value confidence interval were all above .60. Results of the one-way ANOVA suggested differences among the population means, F(3, 36) = 29.15, p < .001, MSE = 0.74, partial η2 = 0.71 , 90% CI [0.53, 0.77](also see Table 2). I conducted two exploratory analyses using the Bonferroni correction. That is, I multiplied each exploratory p value by the number of exploratory analyses for reporting purposes. doubt here I found out that the MovieStar cologne (M = 7.90, SD = 0.74, 95% CI One Way Anova test Major Assignment 1 [7.37, 8.43]) resulted in higher male attractiveness ratings than the NoName cologne (M = 5.50, SD = 1.08, 95% CI [4.73, 6.27]), Mdiff = 2.40, 95% CI [1.53, 3.27], d = 2.59, 95% CI [1.36, 3.79], t(18) = 5.80, p < .001. However, there was no difference between Movie star and Popstar cologne (M = 7.50, SD = 0.71, 95% CI [6.99, 8.01]), Mdiff = 0.40, 95% CI [0.28, 1.08], d = 0.55, 95% CI [-0.35, 1.44], t(18) = 1.24, p=.462 (also see Table 3). Therefore, my planned analysis revealed that males who wore the MovieStar cologne received higher attractiveness ratings than the males who wore no cologne. My exploratory analysis revealed that wearing the MovieStar cologne increases male attractiveness ratings, and that males who wore the MovieStar cologne were rated as being more attractive than those who wore NoName cologne. Thus, based on the results, the best cologne to wear on a date would be either the MovieStar cologne or pop star cologne because there was no significant difference in the attractiveness ratings between these colognes. 4 One Way Anova test Major Assignment 1 5 Appendix Table 01 Descriptive statistics for male attractiveness rating as a function of cologne. M cologne M 95% CI SD [LL, UL] moviestar 7.90 [7.37, 8.43] 0.74 no_cologne 4.90 [4.27, 5.53] 0.88 no_name 5.50 [4.73, 6.27] 1.08 popstar 7.50 [6.99, 8.01] 0.71 Note. M and SD represent mean and standard deviation, respectively. LL and UL indicate the lower and upper limits of the 95% confidence interval for the mean, respectively. The confidence interval is a plausible range of population means that could have created a sample mean (Cumming, 2014). One Way Anova test Major Assignment 1 6 Table 02 Fixed-Effects ANOVA results using rating as the criterion 2 partial η Sum Mean Predictor of df F p 2 partial η 90% CI Square Squares [LL, UL] (Intercep 1664.10 1 1664.10 2235.36 .000 cologne 65.10 3 21.70 29.15 .000 Error 26.80 36 0.74 t) .71 [.53, .77] Note. LL and UL represent the lower-limit and upper-limit of the partial η2 confidence interval, respectively. One Way Anova test Major Assignment 1 7 Table 03 Means, standard deviations, and d-values with confidence intervals Variable M SD 1. moviestar 7.90 0.74 2. no_cologne 4.90 0.88 1 2 3 3.71 [2.20, 5.17] 3. no_name 4. popstar 5.50 7.50 1.08 0.71 2.59 0.61 [1.36, 3.79] [-0.30, 1.50] 0.55 3.27 [-0.35, 1.44] [1.87, 4.62] 2.19 [1.04, 3.30] Note. M indicates mean. SD indicates standard deviation. d-values are estimates calculated using formulas 4.18 and 4.19 from Borenstein, Hedges, Higgins, & Rothstein (2009). dvalues not calculated if unequal variances prevented pooling. Values in square brackets indicate the 95% confidence interval for each d-value The confidence interval is a plausible range of population d-values that could have caused the sample d-value (Cumming, 2014). One Way Anova test Major Assignment 1 Figure 1 Male attractiveness ratings for each cologne type 8 One Way Anova test Major Assignment 1 9 Appendix #Name: Arjun Malik > #2025-02-17 > #Major Assignment 1: One Way Anova > library(tidyverse) > library(skimr) > library(car) > library(Hmisc) > library(apaTables) > library(ggpsyc) > cologne_data glimpse(cologne_data) Rows: 40 Columns: 2 $ cologne "no_cologne", "no_cologne", "no_cologne", "no_cologne", "no_cologn… $ rating 4, 5, 5, 6, 6, 6, 4, 5, 4, 4, 7, 4, 5, 5, 6, 4, 5, 6, 6, 7, 7, 7, … > cologne_data % + mutate_if(is.character, as.factor) > glimpse(cologne_data) Rows: 40 Columns: 2 $ cologne no_cologne, no_cologne, no_cologne, no_cologne, no_cologne, no_col… $ rating 4, 5, 5, 6, 6, 6, 4, 5, 4, 4, 7, 4, 5, 5, 6, 4, 5, 6, 6, 7, 7, 7, … > # Descriptive statistics via Tidyverse > cologne_data %>% + group_by( cologne) %>% + summarise(mean = mean(rating, na.rm = TRUE), + sd = sd(rating, na.rm = TRUE), + var = var(rating, na.rm = TRUE), + LL = smean.cl.normal(rating, na.rm = TRUE)[2], + UL = smean.cl.normal(rating, na.rm = TRUE)[3], + n = sum(!is.na(rating))) %>% + as.data.frame() cologne mean sd var LL UL n 1 moviestar 7.9 0.7378648 0.5444444 7.372163 8.427837 10 2 no_cologne 4.9 0.8755950 0.7666667 4.273637 5.526363 10 3 no_name 5.5 1.0801234 1.1666667 4.727326 6.272674 10 4 popstar 7.5 0.7071068 0.5000000 6.994166 8.005834 10 > # Descriptive statistics via apaTables > apa.1way.table(dv = rating, + iv = cologne, + data = cologne_data, + show.conf.interval = TRUE, + filename = "Table1.doc") Descriptive statistics for rating as a function of cologne. cologne M M_95%_CI SD moviestar 7.90 [7.37, 8.43] 0.74 no_cologne 4.90 [4.27, 5.53] 0.88 no_name 5.50 [4.73, 6.27] 1.08 popstar 7.50 [6.99, 8.01] 0.71 Note. M and SD represent mean and standard deviation, respectively. One Way Anova test Major Assignment 1 10 LL and UL indicate the lower and upper limits of the 95% confidence interval for the mean, respectively. The confidence interval is a plausible range of population means that could have caused a sample mean (Cumming, 2014). > rating_levene print(rating_levene) Levene's Test for Homogeneity of Variance (center = "median") Df F value Pr(>F) group 3 1.1478 0.343 36 > options(contrasts = c("contr.helmert", "contr.poly")) > anova_between_regression apa.aov.table(anova_between_regression, + filename = "Table2.doc") ANOVA results using rating as the dependent variable Predictor SS df MS F p partial_eta2 CI_90_partial_eta2 (Intercept) 1664.10 1 1664.10 2235.36 .000 cologne 65.10 3 21.70 29.15 .000 .71 [.53, .77] Error 26.80 36 0.74 Note: Values in square brackets indicate the bounds of the 90% confidence interval for partial eta-squared > no_cologne_rating % + filter(cologne == "no_cologne")%>% + pull(rating) > no_name_rating % + filter(cologne == "no_name")%>% + pull(rating) > popstar_rating % + filter(cologne == "popstar")%>% + pull(rating) > moviestar_rating % + filter(cologne == "moviestar")%>% + pull(rating) > mdiff_moviestar_vs_no_cologne mdiff_moviestar_vs_popstar mdiff_moviestar_vs_noname print(mdiff_moviestar_vs_no_cologne) [1] 3 > print(mdiff_moviestar_vs_popstar) [1] 0.4 > print(mdiff_moviestar_vs_noname) [1] 2.4 > # Planned/hypothesized t-test > t.test(moviestar_rating, + no_cologne_rating, + var.equal = TRUE, + type = "greater") Two Sample t-test data: moviestar_rating and no_cologne_rating t = 8.2852, df = 18, p-value = 1.483e-07 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: One Way Anova test Major Assignment 1 11 2.239272 3.760728 sample estimates: mean of x mean of y 7.9 4.9 > apa.d.table(dv = rating, + iv = cologne, + data = cologne_data, + filename = "Table3.doc") Means, standard deviations, and d-values with confidence intervals Variable 1. moviestar M SD 1 7.90 0.74 2 3 2. no_cologne 4.90 0.88 3.71 [2.20, 5.17] 3. no_name 5.50 1.08 2.59 [1.36, 3.79] 0.61 [-0.30, 1.50] 4. popstar 7.50 0.71 0.55 3.27 [-0.35, 1.44] [1.87, 4.62] 2.19 [1.04, 3.30] Note. M indicates mean. SD indicates standard deviation. d-values are estimates calcula ted using formulas 4.18 and 4.19 from Borenstein, Hedges, Higgins, & Rothstein (2009). d-values not calculated if unequa l variances prevented pooling. Values in square brackets indicate the 95% confidence interval for each d-value. The confidence interval is a plausible range of population d-values that could have caused the sample d-value (Cumming, 2014). > t.test(moviestar_rating, no_name_rating, + var.equal = TRUE, + type = "two.sided") Two Sample t-test data: moviestar_rating and no_name_rating t = 5.8019, df = 18, p-value = 1.695e-05 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 1.530941 3.269059 sample estimates: mean of x mean of y 7.9 5.5 > t.test(moviestar_rating, popstar_rating, + var.equal = TRUE, + type = "two.sided") Two Sample t-test data: moviestar_rating and popstar_rating t = 1.2377, df = 18, p-value = 0.2317 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -0.2789732 1.0789732 sample estimates: mean of x mean of y 7.9 7.5 > # Check range of data with skim to set y-axis range One Way Anova test Major Assignment 1 > # y-values range -448 to 40462 > cologne_data %>% + skim() ── Data Summary ──────────────────────── Values Name Piped data Number of rows 40 Number of columns 2 _______________________ Column type frequency: factor 1 numeric 1 ________________________ Group variables None ── Variable type: factor ─────────────────────────────────────────────────────────── skim_variable n_missing complete_rate ordered n_unique 1 cologne 0 1 FALSE 4 top_counts 1 mov: 10, no_: 10, no_: 10, pop: 10 ── Variable type: numeric ────────────────────────────────────────────────────────── skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist 1 rating 0 1 6.45 1.54 4 5 7 8 9 ▇▃▇▅▂ > # make the graph > cologne_graph1 ggsave(plot = cologne_graph1, + height = 6, + width = 6, + filename = "Figure1.jpg", + dpi = "print") 12 SHORTENED TITLE 1 Independent t-test Example (Title) Name University of Guelph Student # Professor PSYC ####, Section # SHORTENED TITLE 2 I examined the extent to which coffee and tea differed with respect to ratings of enjoyment, the number of cups (of each beverage) that were purchased each month, and the amount spent per cup. Specifically, I hypothesized that individuals enjoy coffee more than tea and preregistered this hypothesis on the Open Science Foundation website (osf.io). All other analyses were exploratory. Forty individuals participated in the experiment and were randomly assigned to one of two groups (tea or coffee). In the both groups, individuals drank a beverage (tea or coffee), and then rated their enjoyment of the drink on a 10-point scale (1 = hate it, 10 = love it). They also indicated how many days per month they purchased a cup of that beverage, as well as how much they typically paid for a cup. I first examined mean enjoyment ratings of coffee versus tea (see Table 1 for descriptive statistics). The results of Levene’s test did not indicate that we should reject the equality of variances assumption, Levene’s F(1, 38) = 0.17, p = .679, therefore I used the t-test formula based on pooled-variance estimates. My pre-registered one-tailed t test for the difference between tea and coffee revealed that mean enjoyment ratings were higher for coffee (M = 7.20, SD = 1.20) than for tea (M = 6.30, SD = 1.22), Mdiff = 0.90, 95% CI [0.13, 1.67], t(38) = 2.36, p = .012 (one-tailed), d = 0.73, 95% CI [0.10, 1.38], see also Figure 1. The long confidence interval indicates that the effect could be very small or very large by Cohen’s (1988) standards. I also conducted a set of exploratory analyses examining how often individuals purchased each beverage each month on average, and how much each beverage cost on average. A Bonferroni correction of p values was used to account for multiple comparisons. That is, for each p value associated with exploratory tests of mean differences, I multiplied the p value by the number of exploratory analyses for reporting purposes. First, I compared the mean number of days that individuals purchased coffee versus tea. The results of Levene’s test did not indicate SHORTENED TITLE 3 that we should reject the equality of variances assumption, Levene’s F(1, 38) = 0.17, p = .685, so I used the t test formula based on pooled-variance estimates. I found that coffee (M = 21.85, SD = 1.90) was, on average, purchased more often than tea (M = 15.90, SD = 2.15) each month, Mdiff = 5.95, 95% CI [4.65, 7.25], t(38), = 9.28, p < .001 (two-tailed), d = 2.88, 95% CI [2.02, 3.83], see also Figure 2. The large positive values at both ends of the confidence interval suggest that is a very large effect by Cohen’s (1988) standards. Next, I compared the mean amount that individuals paid for coffee versus tea. The results of Levene’s test did not indicate that we should reject the equality of variances assumption, Levene’s F(1, 38) = 0.23, p = .635, and so I used the pooled-variances t test formula. I found no difference between the mean amount paid for coffee (M = 4.50, SD = 1.90) and the mean amount paid for tea (M = 3.74, SD = 2.19), Mdiff = 0.76, 95% CI [-0.56, 2.07], t(38) = 1.16, p = .503 (two-tailed), d = 0.36, 95% CI [-0.26, 0.99], see also Figure 3. The width of the confidence interval suggests that coffee can produce a small decrease, no change, and up to a large increase in the amount of money spend per cup by Cohen’s (1988) standards. The large width of this confidence interval and its overlap with d = 0.00 does not provide clear evidence of an effect of beverage type on amount of money spent. Based on these findings, individuals enjoy coffee more than they enjoy tea. Exploratory analyses also suggest that coffee is purchased more days per month than tea on average, but how much individuals pay on average for each beverage on does not appear to differ. Part 2 The IV in this experiment was the type of beverage (coffee, tea). There were three DVs: enjoyment ratings, number of days a beverage was purchased per month, and the amount that individuals typically paid for the beverage. SHORTENED TITLE The null hypothesis for all tests of means is that the population means for coffee versus tea are equal. The alternative hypothesis for the pre-registered comparison (enjoyment ratings) is that the population mean for coffee is higher than the population mean for tea. The alternative hypothesis for both exploratory analyses (number of times purchased per month, price of each beverage) is that that the populations means for coffee versus tea are not equal. The null hypothesis for Levene’s test of the homogeneity of variance is that the variance of responses in the two samples is equal. The alternative hypothesis is that the variance of responses in the two samples is not equal. 4 SHORTENED TITLE 5 Table 1 Means and Standard Deviations for Enjoyment, Days Purchased Per Month, and Price, for both Coffee and Tea Enjoyment Days Purchased Per Month M SD M SD M SD Coffee 7.20 1.20 21.85 1.90 3.75 2.19 Tea 6.30 1.22 15.90 2.15 4.50 1.90 Note. M and SD represent mean and standard deviation, respectively. . Price SHORTENED TITLE Figure 1 Mean and Individual Enjoyment Ratings for Coffee and Tea Note. Error whiskers indicate 95% confidence interval. The 95% confidence interval containing the triangle should be interpreted for the difference between the two beverage groups. 6 SHORTENED TITLE 7 Figure 2 Mean and Individual Number of Days per Month that Coffee and Tea were Purchased Days per Month 25 8 7 6 5 4 3 2 1 0 −1 20 15 Difference 30 10 5 0 Coffee Tea Beverage Note. Error whiskers indicate 95% confidence interval. The 95% confidence interval containing the triangle should be interpreted for the difference between the two beverage groups. SHORTENED TITLE 8 Figure 3 Mean and Individual Amount of Money Spent on Coffee and Tea 9 ● ● 8 ● 7 6 ● 2.5 ● ● ●● ● ●● ● 3 1 2 ● 1.5 ● ● 2 ●● ● 5 4 3 ● ● ● ● 1 0.5 ● ●● ● ●● 0 ● −0.5 ● ● −1.5 Difference Cost of Beverage (dollars) ● −1 ● ● ●● ● −2 ●● ● ● 0 Coffee Tea Beverage Note. Error whiskers indicate 95% confidence interval. The 95% confidence interval containing the triangle should be interpreted for the difference between the two beverage groups. Appendix In this appendix you should put the OUTPUT from the R Console. You do not need to present your R code. If there is a number that occurs in the text of your APA report – it should be highlighted or circled here and annotated. The annotation should label what the number is and what it means. The purpose of the appendix is to provide you with a tool for studying for the final exam. This tool is extremely important when you have many analyses, and they start to get mixed up. The appendix is required for all assignments (minor or major) in this course. Both Minor and Major assignment question types may be placed on the final exam.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Attached.

T

One Way Anova test Major Assignment 1

One Way Anova test Major
Assignment1

University of Guelph
PSYC *3290, Section # 0

1

One Way Anova test Major Assignment 1

2

One Way Anova test Major Assignment1
For this report, I examined the extent to which female ratings of male attractiveness
varied as a result of the cologne used. Specifically, I hypothesized that males wearing the
popular MovieStar cologne would be rated as more attractive than males wearing no cologne
and preregistered this hypothesis on the Open Science Foundation (osf.io). All other analyses
were exploratory. Forty individuals participated in this experiment and were randomly
assigned to one of four groups (no cologne, NoName cologne, PopStar cologne, and
MovieStar cologne), resulting in 10 individuals per group. A male confederate was instructed
to wear the specified cologne and interact with the female participants. After the encounter
with the male confederate, the female participants were asked to rate how attractive the male
confederate was on a 10-point scale (1 = not at all attractive, 10 = extremely attractive).
Results
I examined the extent to which type of cologne (no cologne, NoName, PopStar and
MovieStar) influenced male attractiveness rating using one-way analysis of variance. The
results of the Levene’s test did not suggest population variances were different, Levene’s F
(3, 36) = 1.15, p = .343. I found support for the planned comparison that the MovieStar
cologne (M = 7.90, SD = 0.74, 95% CI [7.37, 8.43]) would result in higher male
attractiveness ratings than no cologne (M = 4.90, SD = 0.88, 95% CI [4.27, 5.53]), Mdiff =
3.00 95% CI [2.24, 3.76], d = 3.71, 95% CI [2.20, 5.17], t(18) = 8.29, p < .001 (one- tailed).
This was a large effect by Cohen’s (1988) standards and the bounds of the d-value confidence
interval were all above .60.
Results of the one-way ANOVA suggested differences among the population means,
F(3, 36) = 29.15, p < .001, MSE = 0.74, partial η2 = 0.71 , 90% CI [0.53, 0.77](also see
Table 2). I conducted two exploratory analyses using the Bonferroni correction. That is, I
multiplied each exploratory p value by the number of exploratory analyses for reporting

One Way Anova test Major Assignment 1

purposes. doubt here I found out that the MovieStar cologne (M = 7.90, SD = 0.74, 95% CI
[7.37, 8.43]) resulted in higher male attractiveness ratings than the NoName cologne (M =
5.50, SD = 1.08, 95% CI [4.73, 6.27]), Mdiff = 2.40, 95% CI [1.53, 3.27], d = 2.59, 95% CI
[1.36, 3.79], t(18) = 5.80, p < .001. However, there was no difference between Movie star
and Popstar cologne (M = 7.50, SD = 0.71, 95% CI [6.99, 8.01]), Mdiff = 0.40, 95% CI [0.28, 1.08], d = 0.55, 95% CI [-0.35, 1.44], t(18) = 1.24, p=.462 (also see Table 3).
Therefore, my planned analysis revealed that males who wore the MovieStar cologne
received higher attractiveness ratings than the males who wore no cologne. My exploratory
analysis revealed that wearing the MovieStar cologne increases male attractiveness ratings,
and that males who wore the MovieStar cologne were rated as being more attractive than
those who wore NoName cologne. Thus, based on the results, the best cologne to wear on a
date would be either the MovieStar cologne or pop star cologne because there was no
significant difference in the attractiveness ratings between these colognes.

3

One Way Anova test Major Assignment 1

4

Appendix
Table 01
Descriptive statistics for male attractiveness rating as a function of cologne.

M
cologne

M

95% CI

SD

[LL, UL]
moviestar

7.90

[7.37, 8.43]

0.74

no_cologne

4.90

[4.27, 5.53]

0.88

no_name

5.50

[4.73, 6.27]

1.08

popstar

7.50

[6.99, 8.01]

0.71

Note. M and SD represent mean and standard deviation, respectively. LL and UL indicate the lower and upper limits of the
95% confidence interval for the mean, respectively. The confidence interval is a plausible range of population means that
could have created a sample mean (Cumming, 2014).

One Way Anova test Major Assignment 1

5

Table 02

Fixed-Effects ANOVA results using rating as the criterion

2
partial η

Sum
Mean
Predictor

of

df

F

p

2
partial η

90% CI

Square
Squares

[LL, UL]

(Intercep
1664.10

1

1664.10

2235.36

.000

cologne

65.10

3

21.70

29.15

.000

Error

26.80

36

0.74

t)
.71

[.53, .77]

Note. LL and UL represent the lower-limit and upper-limit of the partial η2 confidence interval, respectively.

Table 03

Means, standard deviations, and d-values with confidence intervals

One Way Anova test Major Assignment 1

Variable

M

SD

1. moviestar

7.90

0.74

2. no_cologne

4.90

0.88

6

1

2

3

3.71
[2.20, 5.17]

3. no_name

5.50

4. popstar

7.50

1.08

0.71

2.59

0.61

[1.36, 3.79]

[-0.30, 1.50]

0.55

3.27

[-0.35, 1.44]

[1.87, 4.62]

2.19
[1.04, 3.30]

Note. M indicates mean. SD indicates standard deviation. d-values are estimates calculated using formulas 4.18 and 4.19
from Borenstein, Hedges, Higgins, & Rothstein (2009). d-values not calculated if unequal variances prevented pooling.
Values in square brackets indicate the 95% confidence interval for each d-value The confidence interval is a plausible range
of population d-values that could have caused the sample d-value (Cumming, 2014).

Figure 1

One Way Anova test Major Assignment 1

7

Male attractiveness ratings for each cologne type

Appendix

One Way Anova test Major Assignment 1

8

#Name: Arjun Malik
> #2025-02-17
> #Major Assignment 1: One Way Anova
> library(tidyverse)
> library(skimr)
> library(car)
> library(Hmisc)
> library(apaTables)
> library(ggpsyc)
> cologne_data glimpse(cologne_data)
Rows: 40
Columns: 2
$ cologne "no_cologne", "no_cologne", "no_cologne", "no_cologne", "no_cologn…
$ rating 4, 5, 5, 6, 6, 6, 4, 5, 4, 4, 7, 4, 5, 5, 6, 4, 5, 6, 6, 7, 7, 7, …
> cologne_data %
+ mutate_if(is.character, as.factor)
> glimpse(cologne_data)
Rows: 40
Columns: 2
$ cologne no_cologne, no_cologne, no_cologne, no_cologne, no_cologne, no_col…
$ rating 4, 5, 5, 6, 6, 6, 4, 5, 4, 4, 7, 4, 5, 5, 6, 4, 5, 6, 6, 7, 7, 7, …
> # Descriptive statistics via Tidyverse
> cologne_data %>%

One Way Anova test Major Assignment 1
+ group_by( cologne) %>%
+ summarise(mean = mean(rating, na.rm = TRUE),
+

sd = sd(rating, na.rm = TRUE),

+

var = var(rating, na.rm = TRUE),

+

LL = smean.cl.normal(rating, na.rm = TRUE)[2],

+

UL = smean.cl.normal(rating, na.rm = TRUE)[3],

+

n = sum(!is.na(rating))) %>%

+ as.data.frame()
cologne mean

sd

var

LL

UL n

1 moviestar 7.9 0.7378648 0.5444444 7.372163 8.427837 10
2 no_cologne 4.9 0.8755950 0.7666667 4.273637 5.526363 10
3

no_name 5.5 1.0801234 1.1666667 4.727326 6.272674 10

4

popstar 7.5 0.7071068 0.5000000 6.994166 8.005834 10

> # Descriptive statistics via apaTables
> apa.1way.table(dv = rating,
+

iv = cologne,

+

data = cologne_data,

+

show.conf.interval = TRUE,

+

filename = "Table1.doc")

Descriptive statistics for rating as a function of cologne.

cologne M

M_95%_CI SD

moviestar 7.90 [7.37, 8.43] 0.74
no_cologne 4.90 [4.27, 5.53] 0.88
no_name 5.50 [4.73, 6.27] 1.08
popstar 7.50 [6.99, 8.01] 0.71

Note. M and SD re...

Similar Content

Related Tags