<>
BTW, the type mismatch problem comes from the fact that you are trying to
condition on - if v`i'==""- although your v? variables are numeric and the
code should consequently read - if v`i'==. - .
Even then, the rationale for the -while- loop remains hazy to me. You set
"i" to 4 and then step it up to 5 inside the loop, so the whole thing runs
two times. Then you could simply code
*************
forv i=4/5{
}
*************
HTH
Martin
-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Kalisperos
Gesendet: Donnerstag, 7. Mai 2009 23:10
An: [email protected]
Betreff: st: Type mismatch in while and somes issues with statalist
Hello all,
I have three questions. First, my data structure is like this:
v1 v2 v3......
1 . .
. 2 .
. . 3
........
To stack all observations in v1, I tried the following code, but Stata
returns "type mismatch." How can I do this work?
local i=4
while `i'<5 {
replace v`i'=v`i'+1 if v`i'==""
local i=`i'+1
}
Second, If I send an email to statalist.by starting a new email, my mail is
not posted. If I reply to an existing one, the mail goes through. I know
this is not recommended. How can I post a new thread? Why can I not start a
thread? I removed my account and resubscribed, but it did not work either.
Third, I am receiving two same emails for every posting. Again, I removed my
account and re-subscribed, but I am still getting two same emails of every
posting. How can I fix this problem?
Thank you for your help in advance.
Mike.
*
* 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/
*
* 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/