Hi all, I am trying to learn how to estimate the difference in difference in models with covariates, using the example from this SAS note (https://support.sas.com/kb/61/830.html). In the example (pasted below), I understand the input k1-k12 as the # of means estimated by the LSMEANS statement, but don't fully understand how the datalines (1 -1 -1 1 0 0 0 0...etc) represent the three levels of the covariate of interest. I want to make sure I fully understand this format so I can modify the code for datasets with more covariates or covariates with >3 levels. It seems very basic but any explanation would be greatly appreciated! data difdif;
input k1-k12;
set=1;
datalines;
1 -1 -1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 -1 -1 1 0 0 0 0
0 0 0 0 0 0 0 0 1 -1 -1 1
;
%NLMeans(instore=log, coef=coeffs, link=logit, contrasts=difdif,
title=Difference in Difference of Means)
... View more