proc tscsreg data=dbteqr2;
id stkcd ym;
model dlr = ltrshr lpb lroa inA inB inC inD inE inF inG inH inI inJ inK inL inM inN inO inQ inR inS/fixtwo;/*inA-inS是虚拟变量*/
run;
出错:
ERROR: There is only one cross section or time series observation. Computations will be terminated.
在论坛里查了一下资料,说是非平衡面板问题。于是对于原数据集dbteqr作如下处理,消除了只含一个观测值的数据:
/*将那些只有1个观测值的删掉*/
data dbteqr2;
set dbteqr;
if last.stkcd and first.stkcd then delete;
run;
再对dbteqr2做proc tscsreg,仍然报这个错误:ERROR: There is only one cross section or time series observation. Computations will be terminated.
求大神指点!数据中无缺失值,已经全部剔除。原代码如下:
data dbteqr;
set dbteqr;
ym=year(enddt)*10+qtr(enddt);
if lroa^=. & lpb^=. & dlr^=0;
run;
proc sort data=dbteqr;
by stkcd ym;
run;
/*将那些只有1个观测值的删掉*/
data dbteqr2;
set dbteqr;
if last.stkcd and first.stkcd then delete;
run;
proc sort data=dbteqr2;
by stkcd ym;
run;
proc tscsreg data=dbteqr2;
id stkcd ym;
model dlr = ltrshr lpb lroa inA inB inC inD inE inF inG inH inI inJ inK inL inM inN inO inQ inR inS/fixtwo;
run;
求大神指点!!我币不多,全上了!求指教



雷达卡




京公网安备 11010802022788号







