Deepankar Basu --
I sincerely doubt the code will run as written (e.g.
while `j'<= `j' {
will produce an infinite loop) and it is not clear what you are trying
to do. Hard to help in this case. If you can put in [clear,
succinct] words what you are trying to accomplish, it would be easier
to help, and you might also be closer to a solution of your own
devising...
On 6/7/06, Deepankar Basu <[email protected]> wrote:
1. I want to first generate the following variables:
local i 1
while `i' <= 7 { \\There are a maximum of 7 children in any family
local j 1
while `j'<= `j' {
gen p`i'`j'=0
local j= `j' + 1
}
local i = `i' + 1
}
local k = `nboy'
local i 1
forvalues i=1(1)`k' {
replace p`dfsize'`k' = (0.5)^`alive'
}
I can do this step.
*
* 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/