Thursday, June 6, 2013

Importance of recording observation frequency


With some feedback from MigrantWatch regarding the post about weekend bias in bird observations, it seems that the "Observation frequency" field is very important indeed. The whole weekend effect  does seem to disappear when the data is filtered for only Daily observations.



While, only 3029 of the 22622 observations ~13% of the observations are Daily, the weekend effect does have a nice control and should affect first and last sighting results much less. Just staring at the graphs might not be appealing to the more statistically minded, so doing a test like analysis of variance might be more productive.


 > data.frame(Day=format(as.Date(M$Date), format="%A"),Year=format(as.Date(M$Date), format="%Y"))->WD  
 > as.data.frame(table(WD))->WDD  
 > WDD[WDD$Year %in% c(2007:2013),]->WDDF  
 > aov(Freq~Day,WDDF)->WDDFA  
 > summary(WDDFA)  
       Df Sum Sq Mean Sq F value  Pr(>F)    
 Day     6 3875954 645992 5.0784 0.0005365 ***  
 Residuals  42 5342556 127204             
 ---  
 Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   
 > M[M$"Observation frequency" == "Daily",]->MD  
 >   
 > data.frame(Day=format(as.Date(MD$Date), format="%A"),Year=format(as.Date(MD$Date), format="%Y"))->DWD  
 > as.data.frame(table(DWD))->DWDD  
 > DWDD[DWDD$Year %in% c(2007:2013),]->DWDDF  
 > aov(Freq~Day,DWDDF)->DWDDFA  
 > summary(DWDDFA)  
       Df Sum Sq Mean Sq F value Pr(>F)  
 Day     6  466  77.75 0.0548 0.9993  
 Residuals  42 59625 1419.64          

While the ANOVA shows a significant effect of Day for the whole dataset, it does not show one for data filtered for only daily observations. A much larger sample size would be needed to ensure that this field is being used in a proper way.

The other point about these observations being affected by Holidays also seems very valid. 
 as.data.frame(table(data.frame(Day=format(as.Date(M$Date), format="%j"))))->DY  
 > DY[DY$Freq>200,]  
   Var1 Freq  
 20  020 246  
 27  027 224  
 337 337 261  
 358 358 213  
 365 365 204  
By tabulating the observations by day of year, annual holidays like Christmas and New years should be captured. Lo and behold! Christmas (358th day of the year) and New years eve (365th day) are in the top five.

Why does 337th day (Lawyers day in India) have the most observations? May be most of the birders are lawyers!!


No comments: