Tanner Norton 5/25/2019



Background

Overview

A two-way ANOVA with an interaction term will be used to test the data. The two factors will be Treatment and Week_fine.

Model with interaction term

\[ Y_{ijk} = \mu + \alpha_i + \beta_j + \alpha\beta_{ij} + \epsilon_{ijk} \] In this model the factor Treatment is \(\alpha\) that has two levels, Fine = 1 & Control = 2.

First factor hypothesis: Does being part of the treatment group affect the number of children left late at day care?

\[ H_0: \alpha_1 = \alpha_2 = \alpha_3 = 0 \] \[ H_a: \alpha_i \neq0 \] In this model the factor Week_fine is \(\beta\) which has three levels, (BeforeFine = 1, Fine = 2, AfterFine = 3). Second factor hypothesis: Do weeks in which fines are implemented or not affect the number of children left late at day care?

\[ H_0: \beta_1 = \beta_2 = \beta_3 = 0 \]

\[ H_a: \beta_i \neq0 \] Interaction term hypothesis: Is there an interaction between Treatment and Week_fine

\[ H_0: \;The \;effect \;of \;Treatment \;is \;the \;same \;for \;all \;levels \;of \;WeekFine \] \[ H_a: \;The \;effect \;of \;Treatment \;is \;different \;for \;at \;least \;one \;level \;of \;WeekFine \]

Study Details

This background is quoted directly from the article “A Fine is a Price”.

There are two types of day-care centers in Israel: private and public. A study was conducted in 10 private day-care centers in the city of Haifa from January to June 1998. All of these centers are located in the same part of town, and there is no important difference among them. During the day children are organized into groups according to age, from 1 to 4 years old. Each day-care center is allowed to hold a maximum of 35 children. In some exceptional cases a few additional children are allowed. The fee for each child is NIS 1,400 per month. (The NIS is the New Israeli Shekel.) At the time of the study, a U.S. dollar was worth approximately NIS 3.68, so the fee was about $380 at that time.

The contract signed at the beginning of the year states that the day-care center operates between 0730 and 1600. There is no mention of what happens if parents come late to pick up their children. In particular, before the beginning of the study, there was no fine for coming late. When parents did not come on time, one of the teachers had to wait with the children concerned. Teachers would rotate in this task, which is considered part of the job of a teacher, a fact that is clearly explained when a teacher is hired. Parents rarely came after 1630.

A natural option [to fix the problem of parents showing up late] is to introduce a fine: every time a parent comes late, [they] will have to pay a fine. Will that reduce the number of parents who come late? If the fine is removed, will things revert back to the way they were originally?

The overall period of the study was 20 weeks. In the first 4 weeks we simply recorded the number of parents who arrived late each week. At the beginning of the fifth week, we introduced a fine in six of the 10 day-care centers, which had been selected randomly. The announcement of the fine was made with a note posted on the bulletin board of the day-care center. Parents tend to look at this board every day, since important announcements are posted there. The announcement specified that the fine would be NIS 10 for a delay of 10 minutes or more. The fine was per child; thus, if parents had two children in the center and they came late, they had to pay NIS 20. Payment was made to the principal of the day-care center at the end of the month. Since monthly payments are made to the owner during the year, the fines were added to those amounts. The money was paid to the owner, rather then to the teacher who was staying late (and did not get any additional money). The teachers were informed of the fine but not of the study. Registering the names of parents who came late was a common practice in any case.

At the beginning of the seventeenth week, the fine was removed with no explanation. Notice of the cancellation was posted on the board. If parents asked why the fines were removed, the principals were instructed to reply that the fine had been a trial for a limited time and that the results of this trial were now being evaluated.

A comparison with other fines in Israel may give an idea of the size of the penalty that was introduced. A fine of NIS 10 is relatively small but not insignificant. In comparison, the fine for illegal parking is NIS 75; the fine for driving through a red light is NIS 1,000 plus penalties; the fine for not collecting the droppings of a dog is NIS 360. For many of these violations, however, detection and enforcement are low or, as in the case of dog dirt, nonexistent in practice. A baby-sitter earns between NIS 15 and NIS 20 per hour. The average gross salary per month in Israel at the time of the study was NIS 5,595.

The Data (Wide)

The late Day Care Center data is shown here in the “wide data format”.

#Show the full width of the "Wide" version of the late data:
pander(late, split.tables = Inf)
Treatment Center No.ofChidren Week1 Week2 Week3 Week4 Week5 Week6 Week7 Week8 Week9 Week10 Week11 Week12 Week13 Week14 Week15 Week16 Week17 Week18 Week19 Week20
Fine 1 37 8 8 7 6 8 9 9 12 13 13 15 13 14 16 14 15 16 13 15 17
Fine 2 35 6 7 3 5 2 11 14 9 16 12 10 14 14 16 12 17 14 10 14 15
Fine 3 35 8 9 8 9 3 5 15 18 16 14 20 18 25 22 27 19 20 23 23 22
Fine 4 34 10 3 14 9 6 24 8 22 22 19 25 18 23 22 24 17 15 23 25 18
Fine 5 33 13 12 9 13 15 10 27 28 35 10 24 32 29 29 26 31 26 35 29 28
Fine 6 28 5 8 7 5 5 9 12 14 19 17 14 13 10 15 14 16 6 12 17 13
Control 7 35 7 10 12 6 4 13 7 8 5 12 3 5 6 13 7 4 7 10 4 6
Control 8 34 12 9 14 18 10 11 6 15 14 13 7 12 9 9 17 8 5 11 8 13
Control 9 34 3 4 9 3 3 5 9 5 2 7 6 6 9 4 9 2 3 8 3 5
Control 10 32 15 13 13 12 10 9 15 15 15 10 17 12 13 11 14 17 12 9 15 13

The Data (Long)

The Late Day Care Center data is shown here in the “long data format”.

# This code reshapes the data into "long" format called Late.
# To get the "Late" dataset into your R Console, 
# you need to click the green "play" arrow in 
# the top right corner of this gray R-Chunk. 
# Then type:
#   > View(Late)
# in your R Console
Late <- reshape(late,
                varying = paste("Week",1:20, sep=""), 
                v.names = "No.ofLateChildren",
                timevar = "Week", 
                times = 1:20, 
                idvar = "Center",
                new.row.names = 1:200,
                direction = "long")
pander(Late)
Treatment Center No.ofChidren Week No.ofLateChildren
Fine 1 37 1 8
Fine 2 35 1 6
Fine 3 35 1 8
Fine 4 34 1 10
Fine 5 33 1 13
Fine 6 28 1 5
Control 7 35 1 7
Control 8 34 1 12
Control 9 34 1 3
Control 10 32 1 15
Fine 1 37 2 8
Fine 2 35 2 7
Fine 3 35 2 9
Fine 4 34 2 3
Fine 5 33 2 12
Fine 6 28 2 8
Control 7 35 2 10
Control 8 34 2 9
Control 9 34 2 4
Control 10 32 2 13
Fine 1 37 3 7
Fine 2 35 3 3
Fine 3 35 3 8
Fine 4 34 3 14
Fine 5 33 3 9
Fine 6 28 3 7
Control 7 35 3 12
Control 8 34 3 14
Control 9 34 3 9
Control 10 32 3 13
Fine 1 37 4 6
Fine 2 35 4 5
Fine 3 35 4 9
Fine 4 34 4 9
Fine 5 33 4 13
Fine 6 28 4 5
Control 7 35 4 6
Control 8 34 4 18
Control 9 34 4 3
Control 10 32 4 12
Fine 1 37 5 8
Fine 2 35 5 2
Fine 3 35 5 3
Fine 4 34 5 6
Fine 5 33 5 15
Fine 6 28 5 5
Control 7 35 5 4
Control 8 34 5 10
Control 9 34 5 3
Control 10 32 5 10
Fine 1 37 6 9
Fine 2 35 6 11
Fine 3 35 6 5
Fine 4 34 6 24
Fine 5 33 6 10
Fine 6 28 6 9
Control 7 35 6 13
Control 8 34 6 11
Control 9 34 6 5
Control 10 32 6 9
Fine 1 37 7 9
Fine 2 35 7 14
Fine 3 35 7 15
Fine 4 34 7 8
Fine 5 33 7 27
Fine 6 28 7 12
Control 7 35 7 7
Control 8 34 7 6
Control 9 34 7 9
Control 10 32 7 15
Fine 1 37 8 12
Fine 2 35 8 9
Fine 3 35 8 18
Fine 4 34 8 22
Fine 5 33 8 28
Fine 6 28 8 14
Control 7 35 8 8
Control 8 34 8 15
Control 9 34 8 5
Control 10 32 8 15
Fine 1 37 9 13
Fine 2 35 9 16
Fine 3 35 9 16
Fine 4 34 9 22
Fine 5 33 9 35
Fine 6 28 9 19
Control 7 35 9 5
Control 8 34 9 14
Control 9 34 9 2
Control 10 32 9 15
Fine 1 37 10 13
Fine 2 35 10 12
Fine 3 35 10 14
Fine 4 34 10 19
Fine 5 33 10 10
Fine 6 28 10 17
Control 7 35 10 12
Control 8 34 10 13
Control 9 34 10 7
Control 10 32 10 10
Fine 1 37 11 15
Fine 2 35 11 10
Fine 3 35 11 20
Fine 4 34 11 25
Fine 5 33 11 24
Fine 6 28 11 14
Control 7 35 11 3
Control 8 34 11 7
Control 9 34 11 6
Control 10 32 11 17
Fine 1 37 12 13
Fine 2 35 12 14
Fine 3 35 12 18
Fine 4 34 12 18
Fine 5 33 12 32
Fine 6 28 12 13
Control 7 35 12 5
Control 8 34 12 12
Control 9 34 12 6
Control 10 32 12 12
Fine 1 37 13 14
Fine 2 35 13 14
Fine 3 35 13 25
Fine 4 34 13 23
Fine 5 33 13 29
Fine 6 28 13 10
Control 7 35 13 6
Control 8 34 13 9
Control 9 34 13 9
Control 10 32 13 13
Fine 1 37 14 16
Fine 2 35 14 16
Fine 3 35 14 22
Fine 4 34 14 22
Fine 5 33 14 29
Fine 6 28 14 15
Control 7 35 14 13
Control 8 34 14 9
Control 9 34 14 4
Control 10 32 14 11
Fine 1 37 15 14
Fine 2 35 15 12
Fine 3 35 15 27
Fine 4 34 15 24
Fine 5 33 15 26
Fine 6 28 15 14
Control 7 35 15 7
Control 8 34 15 17
Control 9 34 15 9
Control 10 32 15 14
Fine 1 37 16 15
Fine 2 35 16 17
Fine 3 35 16 19
Fine 4 34 16 17
Fine 5 33 16 31
Fine 6 28 16 16
Control 7 35 16 4
Control 8 34 16 8
Control 9 34 16 2
Control 10 32 16 17
Fine 1 37 17 16
Fine 2 35 17 14
Fine 3 35 17 20
Fine 4 34 17 15
Fine 5 33 17 26
Fine 6 28 17 6
Control 7 35 17 7
Control 8 34 17 5
Control 9 34 17 3
Control 10 32 17 12
Fine 1 37 18 13
Fine 2 35 18 10
Fine 3 35 18 23
Fine 4 34 18 23
Fine 5 33 18 35
Fine 6 28 18 12
Control 7 35 18 10
Control 8 34 18 11
Control 9 34 18 8
Control 10 32 18 9
Fine 1 37 19 15
Fine 2 35 19 14
Fine 3 35 19 23
Fine 4 34 19 25
Fine 5 33 19 29
Fine 6 28 19 17
Control 7 35 19 4
Control 8 34 19 8
Control 9 34 19 3
Control 10 32 19 15
Fine 1 37 20 17
Fine 2 35 20 15
Fine 3 35 20 22
Fine 4 34 20 18
Fine 5 33 20 28
Fine 6 28 20 13
Control 7 35 20 6
Control 8 34 20 13
Control 9 34 20 5
Control 10 32 20 13

Analysis

Summary Stats

pander(Late3)
X Week_fine Avg.late Min.late Max.late Percent.Late..
1 AfterFine 14.53 3 35 43.1
2 BeforeFine 8.8 3 18 26.11
3 Fine 13.56 2 35 40.23

QQPlot

qqPlot(Late2$No.ofLateChildren, ylab = "No. of late pickups", xlab = "Number of late pickups")

## [1]  85 175

The QQplot above demonstrates that the data is not normally distributed, however, the sample size of 200 is large enough to invoke the central limit theorem.

Residuals

LateAov <- aov(No.ofLateChildren ~ Treatment + Week_fine +Week_fine:Treatment , data=Late2)
plot(LateAov, which=1)

The Residuals vs Fitted graph shows that the variance in the error terms appears to be similar enough. The rule of thumb being that as long as the largest variance in the error terms is not three time greater than the smallest variance.

XYplots

xyplot( No.ofLateChildren ~ Treatment, data=Late2, type=c("p","a"), ylab = "Number of late pickups") 

xyplot( No.ofLateChildren ~ as.factor(Week_fine), data=Late2, type=c("p","a"),ylab = "Number of late pickups",
        xlab = "Week fine")

xyplot( No.ofLateChildren ~ Week_fine, data=Late2, groups= Treatment, type=c("p","a"), auto.key=list(corner=c(1,1)), 
        ylab = "Number of late pickups", xlab = "Week fine")

ANOVA test results

The requirements were fulfilled as shown above with the plots to perform ANOVA. The output is as follows.

LateAov <- aov(No.ofLateChildren ~ Treatment + Week_fine +Week_fine:Treatment , data=Late2)
# pander(summary(LateAov))

summary(LateAov)
##                      Df Sum Sq Mean Sq F value   Pr(>F)    
## Treatment             1   1740  1740.0   54.25 4.92e-12 ***
## Week_fine             2    828   414.0   12.91 5.46e-06 ***
## Treatment:Week_fine   2    848   423.9   13.22 4.16e-06 ***
## Residuals           194   6222    32.1                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Interpretation

This ANOVA test found suprising results in which all facors and the interaction were found significant. This means that there was sufficient evidence to reject the null hypothesis for all tests and accept the alternatives. Beginning with the first factor Treatment, it can be in both the xyplot and p-value, that those who were in the fine group had a greater number of late pickups than their counterpart control group. Considering the second factor Week_fine, we find that the number of late pickups increased as the study went on. In fact the xyplot shows that once week 5 came and the fine was first introduced the number of late pickups shot up dramatically from an average of 8.8 to 13.56. Then once the fine was discontinued in week 17 we still saw the number of late pickups rise but only very slightly to 14.53. There is an interaction that is taking place between Treatment and Weekfine as can be seen in the xyplot because there are no parallel lines.

When the fine was introduced it was done with the purpose to decrease the number of late pickups, however, the opposite seems to have happend. I believe this is because the fine was not high enough to deter parents from comming late. Instead it created the incentive to leave there kids for and extra half hour or so because the parents valued that time more than the fine amount. If the fine was high enough it would provide a stronger incentive for parents to come on time.