我的理解是你需要T value for testing mean = 0;
以下程序是基于你已经分好组。每个组15个记录。如果不是如此,如何标定_n可能较复杂。取决你具体的数据
[code:pkwpq3pr]data had;
set; by code sdate notsorted;
_n ++1;
if first. sdate then _n = -4;
run;
proc format;
value _n1Fmt -4 =1 -3 =2 -2-0 = 3 1 =4 2-8 =5 9-10 =6;
run;
proc means data = had noprint;
class code sdate _n; ways 3;
var a;
format _n _n1Fmt.;
output out = MeansOut mean = mean;
run;
proc means data = MeansOut noprint;
class _n; ways 1;
var mean;
output out = MeansOut1(drop = _type_ _freq_) n = n mean = mean t = t;
run;;[/code:pkwpq3pr]