由买买提看人间百态

topics

全部话题 - 话题: xmean
(共0页)
c*w
发帖数: 4736
1
来自主题: Computation版 - skewness in sas?
sorry for using English...
does anyone know how sas computes its skewness?
it looks like sas computes variance by: sum(x - xmean)^2/(N-1)
for skewness, it looks like it has something to do with N as well,
not simply sum(x - xmean)^3/(sqrt(variance)^3).
g**a
发帖数: 2129
2
来自主题: Statistics版 - SAS simulation question (包子题 - 5个)
data one;
input FirmID $ Year earnings $ Mean Variance ;
datalines;
BBB 2004 E1 100 8
BBB 2005 E2 300 10
BBB 2006 E3 600 12
BBB 2007 E4 530 30
BBB 2008 E5 410 28
;
run;
proc IML;
use one;
read all;
xmean=mean;
xvar=variance;
xyear=year;
Numrow=Nrow(xmean);
do y=1 to Numrow;
sim=rand('NORMAL', mean[y], sqrt(variance[y]));
do x=2 to 250 by 1;
sim=sim||rand('NORMAL', mean[y], sqrt(variance[y]));
(共0页)