# Investigate the effect of street-light regime on insects

I need advice on a suitable analysis of a dataset that has an awkward design - because we investigate a real-world situation -we have two sites (A,B) where we can conduct the research. The hypothesis is: under dimmed light, we catch less insects than under fully lit street lights.

I have two sites (A and B). The two sites each have ten street lights that were sampled during 16 nights of dimmed light and during 16 nights of full light. During these total of 32 nights, we sampled insects at each street-light pole (10 per site, 20 in total). For A and also at B, we also have temperature as a variable (nightly average, max, min (a measure per site not per light pole).

I would like to fit a model: number of insects ~ dimming, temp_mean, temp_min ,temp_max, site

I include "site" as categorical variable and would like to use the 32 nights (16 dimmed, 16 fully lit) as 32 unique samples (each night as one sample). I am not sure whether this is "statistically sound". If not, does anybody have an idea on how to evaluate such data in order to prove the hypothesis? Would you go for t-test, PCA or something else?

R test.data ->

streetlight<-data.frame(site=c(rep("A",16),rep("B",16),rep("A",16),rep("B",16)), dimming=c(rep(1,32),rep(0,32)),temp_mean=runif(32, min=20, max=24),temp_min=runif(32, min=12, max=19),temp_max=runif(32, min=25, max=28),insects=round(runif(32, min=5, max=20),0))


## 1 Answer

Please avoid PCA. Go with logistic regression and work out the odds ratio. This is far and away the easiest most powerful method.

Oh and you're likely to see a negative binomial distribution, very common for insect distributions. Your next step would be to get some DNA out of them