Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



------------------------------------------------------------------------
--------

If I understand this correctly, something like this may suit: 

forval i = 1/198 { 
	qui su ps [aweight = spl`i'], detail 
	di %3.0f `i' %10.3f r(skewness) %10.3f r(kurtosis) 
} 

Nick 
[email protected] 

P.S. "sorting" is sedimentology-speak for variability, but Alona asks
for skewness and kurtosis. If she wants other measures too, modify the
-display- above. 



Armstrong, Alona

I have some particle size data with a class size column (called 'ps'
with 50 or 100 classes) and 198 columns with frequencies in for
different samples. I need to calculate the skewness and kurtosis for
each of the samples. I've done this for individual samples by:
summarize ps [aweight = spl1], detail 
Or perhaps more neatly:
tabstat ps [aweight = spl1], statistics( kurtosis skewness )
columns(variables)
But, what I really need is either a dataset or a table for all 198
samples at once? I've looked at xcontract/xcollapse but these don't seem
to have a skew and kurtosis option.

Thanks,
Alona


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index