My study for my Bachelor Thesis consists of 3 independent variables and one dependent variable. I want to analyze whether cooperative attitude predicts a change in defending behavior against bullying in a one-year period AND if the cooperative attitude is moderated by popularity goal.

IV1: Defender Behavior (Time Point 1) = Count Variable IV2: Cooperative Attitude (Time Point 1) = Continuous Variable IV3: Popularity Goal (Time Point 1) = Continuous Variable DV: Defender Behavior (Time Point 2) = Count Variable

Students are asked at two different time points who in their class exhibits defender behavior. The value of defender behavior will be the amount a student was mentioned by others, which makes the defender variable a count variable. The other variables are only asked once at time point 1. Unfortunately, we have never discussed how to deal with count variables in our statistics classes, so I am unsure which analysis I would have to do especially considering that my study is longitudinal and includes moderation. If more information is needed please let me know and I will try my best to answer. I'd appreciate any advice coming my way!


1 Answer 1


Since you are treating Defender Behavior at time point 1 as an independent variable and since you have only two time points you don't really have a panel but cross-sectional count data. The standard approach for modelling unbounded cross-sectional count variables, i.e. counts that do not have a theoretical upper bound, is by means of a Poisson regression. The basic setup is as follows.

Let $Y_i, X_i$ be the pairs for each statistical unit $i$, with $Y_i$ being the response variable, and $X_i$ a (vector) of explanatory or independent variables. The model is then

$$Y_i\,\sim \, \text{Poisson}(\lambda_i),\text{ idependently and}$$ $$\log(\lambda_i) = \beta_0 + X_i^\top\beta,\quad i=1,\ldots, n.$$

We are assuming that units are independently Poisson-distributed with mean $\lambda_i$ and the log-mean, i.e. $\log(\lambda_i)$, is linearly related to available covariates $X_i$, with the relation captured by the regression parameter $\beta$, whereas $\beta_0$ is an intercept term.

The model can be fit by means of maximum likelihood or other similar methods. There are many ways to extend this model depending also on the features of the response (excessive number of zeros, overdispersion, etc.), such as negative binomial regression, zero-inflated Poisson, etc. Here I am barely scratching the surface, and if you want to go deeper check, e.g. Cameron and Trivedi, Regression Analysis of Count Data, 2nd edition, Cambridge, 2013, ISBN: 9781107667273.

I am not familiar with (non-open source) SPSS but in R you can fit a Poisson regression via the glm command

glm(def2 ~ iv1 + iv2 + iv3 + iv3, data= mydata, family = poisson())

For an R-based treatment of regression models for count data check also the book by Julian Farawy titled Extending the Linear Model with R, ISBN: 9781315382722.

  • $\begingroup$ Thank you very much! I think for my proposal it should suffice for now to mention that I intend on using the Poisson Regression Analysis. I was just confused if I could still do it when one of the independent variables was a count variable as well as I only read about count variables as dependent variables. $\endgroup$
    – Julia
    Feb 24, 2023 at 11:51
  • 1
    $\begingroup$ no, you can use whatever independent variable, is the nature of the dependent variable that dictates which regression model is useful. $\endgroup$
    – utobi
    Feb 24, 2023 at 12:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.