0
$\begingroup$

My dataset consists of 3 variables: species, count, time period (current vs past).

My research question is to compare the counts of each species in current period to the corresponding counts in past period and identify which current species count has significantly increased.

I am thinking of performing a Poisson regression to answer this, how should I set up the data in the correct structure?

species <- c("A", "B", "C", "D", "E", "A", "B", "C", "D", 
             "E")
count <- c(2, 4, 0, 3.3, 5, 10, 12, 6, 2, 7)
time <- c("current", "current", "current", "current", 
          "current", "past", "past", "past", "past", "past")
mydat <- data.frame(species, count, time)
mydat
       species count    time
1        A   2.0 current
2        B   4.0 current
3        C   0.0 current
4        D   3.3 current
5        E   5.0 current
6        A  10.0    past
7        B  12.0    past
8        C   6.0    past
9        D   2.0    past
10       E   7.0    past
$\endgroup$
1
  • 1
    $\begingroup$ You do have a count of 3.3 Can you explain or correct? $\endgroup$ Oct 17 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy