I have a panel data set with 216 individuals that took part in a game of 10 rounds, so I have 2160 observations. The participants were asked to make contributions: C_it is the contribution of all i to t.
All the participants were part of a group, 18 groups in total... groups are independent of each other but C_it of participants within the same group are correlated.
I want to do a gls regression on my data, by including subject-specific random effects and by clustering standard errors at the matching-group level.
I used the plm
package and the function pggls
:
pdata = pdata.frame(perms, index=c("Idsubject","Period"))
test1 = pggls( contribution_it ~ pfirst_dummy + tfirst_dummy + t, data = pdata, model = "random")
The groups are defined in a variable within my dataset, but I don't know how to include the dependence of groups in my regression.