Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Simple syntax question


From   Serguei Kaniovski <kaniovsk@wifo.ac.at>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Simple syntax question
Date   Thu, 20 Jul 2006 18:16:19 +0200

OK, I have corrected the first two errors, but how to compute
sum11_i_j, sum10_i_j, etc over sumT_i_j in the second loop, i.e. instead of ..., which should be a scalar of high precision. Thanks.

*INITIALIZE SUMS;
forval i=1/5 {;
local I=`i'+1;
forval j=`I'/`nj' {;
local sum11_`i'_`j'=10;
local sum10_`i'_`j'=20;
local sum01_`i'_`j'=30;
local sum00_`i'_`j'=40;
local sumT_`i'_`j'=100;
};
};

*COMPUTE RELATIVE FREQUENCIES;
forval i=1/5 {;
local I=`i'+1;
forval j=`I'/`nj' {;
local frq11_`i'_`j'=...;
local frq10_`i'_`j'=...;
local frq01_`i'_`j'=...;
local frq00_`i'_`j'=...;
};
};
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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