请教各位前辈和大神们,用SAS做固定效应模型,程序如下:
proc panel data=all;
id area1_ year;
class gender_ age_ education_ marriage_ work health_ visit area2 insurance_ family_ old_age_support_ socialfreq_;
model total_med_cost=gender_ age_ education_ marriage_ work health_ disability chronic_dis visit income area2
insurance_ family_ old_age_support_ socialfreq_/fixtwo;
run;
问题1:area1_是”城乡“二分类变量,报错如下:ERROR: Data set WORK._CLSS_ is not sorted in ascending sequence with respect to time series ID. The current time period has year=2011 and the previous time period has year=2015 in cross section area1_=2. 对变量重新排序后还是报错,该问题是因为area1_这个变量不唯一吗?应该如何解决这个问题?
问题2:想对一些分类变量哑变量化,并指定对照组,该如何写程序?