text: user6298: 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))
  
  
  user7374: 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.
  
original_text: 6298: <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>
   7374: <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>
  