# Calculate a slope with only 3 points?

I have a dataset that includes repeated counts of individuals at 3 successive time points. I have 8 experimental groups, with 5 replicates each (count repeated over 5 days). My goal is to obtain the increase of the number of individuals for each experimental group, for each day (ie for each line of the dataset).

Does it make sense to run a linear model (count ~ time) on only 3 points to obtain the slope for each replicate x day, so I can use these values in downstream analysis? At this point I'm not interested in a model that describes the whole dataset.

I have the feeling that it would be wrong to perform a linear model on only 3 points, but I couldn't find any other way.

Here what the data looks like for the first two days, subcolony is the experimental group (NZ.X, there are 8 of them), and n_0, n_10 and n_20 are the three counts.

subcolony day n_0 n_10 n_20
NZ4       16   0   164  141
NZ8       16   0    50   52
NZ12      16   0    93   97
NZ16      16   0    86  138
NZ20      16   0    92   89
NZ23      16   0    90  108
NZ27      16   0   101  130
NZ31      16   0    84  144
NZ4       17   0   106   97
NZ8       17   0    56   59
NZ12      17   0    47   51
NZ16      17   0    58   68
NZ20      17   0    85   63
NZ23      17   0   105   82
NZ27      17   0    76  104
NZ31      17   0    32   40

• It is not totally clear how does your data look like. Could you post your data? Or at least made-up example that resembles your data? – Tim Mar 8 '16 at 7:57

You really only appear to have two data points since all begin with zero. If the population counts were 7,15,123 then it might make some sense, though very limited sense.

Part of the issue is that a regression should, generally, be replicating your data generation process. Is your data generation process linear? If it is not, then it is dubious.

There are ways where you could begin with zero and eventually have many. For example, you could have an object with no defects or no deaths and then have many defects or deaths. It doesn't appear meaningful here though. The initial value doesn't really appear to be data, but rather the value before the start of a process. The regression should measure the impact of a process.

I could imagine a process where people could choose which group to opt into where all groups begin with zero, except something isn't a group without people in it. This begs another question. Is zero here a real number? Can zero actually happen and does it mean "nothing." Zero degrees Fahrenheit does not mean that there is no temperature, but zero degrees Kelvin does. Is zero, in this case, really "before we started" and not "no people."

Finally, there may be population dynamics that matter here. For example, if at time 5 there are a total of 75 people who must allocate among 8 choices and these 75 are not a sample from 10,000,000 people then there are other constraints that should be considered in your modeling. After all, if you know 7 groups, then you automatically know the composition of the eighth group. That can change how things are modeled.

If this is a fixed colony with eight subcolonies and you are working with the entire population at each point in time, then no you cannot use a linear model with sampling statistics because you are not working with samples, you are working with the population. Subcolonies are not samples in the same sense that Pittsburgh, Pennsylvania is not a random sample of the United States.

I think you need to work out how people end up in a subcolony and/or the broader population. Changes only make sense with respect to a theory about how changes would happen. So, no, you cannot use a linear model unless you believe there is a theoretical reason that the process should be strictly linear with each subcolony totally independent of the others and even then only if zero doesn't mean before the experiment starts.

I think that as long as you recognize the limitations of your inference, eg by confidence intervals, or bootstrap, then you can proceed. Of course, you can't believe that your analysis will have an outstanding external validity.