Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: posting question.


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: posting question.
Date   Thu, 30 Sep 2004 17:31:31 +0100

I am confused. I don't understand what 
works and what doesn't. 

Stas may well be right: -mrate- could 
be producing pure garbage. But I can't 
comment on a program I can't see in 
an area I don't know. From what 
you tell us I still suggest 

su v001, meanonly
local nclust = r(max)
gen mortrate = . 
qui forval i=1/`nclust' {
      cap mrate if v001==`i'
      replace mortrate = $U_1_1 if v001 == `i' 
     
}

Incidentally, from your information, -mrate- seems
a rather strange program if it doesn't 
need to know what variables to work on. 

Nick 
[email protected] 

[email protected]
 
> I meant: I didn't find a way.
                
[email protected]                  

> I do find a way of doing in the same data. I try:
> 
> qui forv i=1/`nclust' {
>     cap mrate if v001==`i'
>     replace mortrate = $U_1_1
>     local cluster = id[`i']
>     local mortrate = mortrate[`i']
>     post mortrate (`cluster') (`mortrate')
> }
> 
> and it works fine.
> 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index