<p>The hypothesis can be examined by t-test. You can group the data (number of catches) into  dimmed light, and fully lit street lights and proceed with t-test to assess whether dimmed light results  in less en-catchment or higher en-catchment or equivalent encatchment.  Alternatively, a linear model can be applied subject to certain conditions  here. PCA is not  appropriate here.</p>

CC BY-SA 4.0
2020-03-13T03:52:43.270Z
2020-03-13T05:20:07.527Z
2020-03-13T05:20:07.527Z
Subhash C. Davar
<p>Please avoid PCA. Go with logistic regression and work out the odds ratio. This is far and away the easiest most powerful method.</p>

<p>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</p>

CC BY-SA 4.0
2019-10-01T16:09:43.960Z
2019-10-01T21:36:20.587Z
2019-10-01T21:36:20.587Z
M__
<p>I need advice on a suitable analysis of a dataset that has an akward 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 number of insects than under-fully lit street lights.</p>

<p>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.</p>

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

<p>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?</p>

<pre><code>streetlight &lt;- 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),t
                          emp_min=runif(32, min=12, max=19),temp_max=runif(32, min=25, max=28),
                          insects=round(runif(32, min=5, max=20),0))
</code></pre>

<r><linear-regression>
How do I Investigate and test the hypothesis on the effect of street-light regime on insects?
# How do I Investigate and test the hypothesis on the effect of street-light regime on insects?

(Asked by: username_0 on 2019-10-01)

I need advice on a suitable analysis of a dataset that has an akward 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 number of insects than under-fully lit street lights.
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?
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),t
                          emp_min=runif(32, min=12, max=19),temp_max=runif(32, min=25, max=28),
                          insects=round(runif(32, min=5, max=20),0))

**Tags:** r, linear-regression

---

## 2 answers

### Answer by username_1 on 2020-03-13. Score: 1

The hypothesis can be examined by t-test. You can group the data (number of catches) into dimmed light, and fully lit street lights and proceed with t-test to assess whether dimmed light results in less en-catchment or higher en-catchment or equivalent encatchment. Alternatively, a linear model can be applied subject to certain conditions here. PCA is not appropriate here.


---

### Answer by username_2 on 2019-10-01. Score: 0

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


---

