I have an unbalanced panel of a variable. That is, I have a panel of n time series of varying length. Each n denotes a firm. I conducted a t-test to compare the (unweighted) mean of the entire panel with 0. I did this by estimating an intercept only regression model. To account for autocorrelation at the firm level, I clustered the standard errors at the firm level. In SAS terms, this looks as follows (firm is the firm identifier):
proc surveyreg data = data;
cluster firm;
model variable = ;
run;
I now want to repeat this test for the mean weighted by firms, i.e. the mean which is equally affected by each firm, irrespective of the number of observations per firm. Also, I still want want to explicitly take the autocorrelation at the firm level into account.
Is this possible?
EDIT: What I came up with now is to specify a weight variable that assigns each observation its respective weight according to the weighting I want to achieve (described above). I then include the WEIGHT statement in the proc surveyreg procedure, using the weighting variable. Everything else is held equal, i.e.:
proc surveyreg data = data;
cluster firm;
model variable = ;
weight weightvariable;
run;
Does this make sense?
... View more