Statalist


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

Re: st: cycling paired t test (and signed rank sum test)


From   Diego Bellavia <[email protected]>
To   [email protected]
Subject   Re: st: cycling paired t test (and signed rank sum test)
Date   Sun, 21 Oct 2007 20:41:27 +0000 (GMT)

----- Messaggio originale -----
[...] So, Diego's code could be rewritten as

local array1 a1 b1 c1
local array2 a2 b2 c2
local n : word count `array1'
forval i = 1/`n' {
    local var1 : word �i' of �array1'
    local var2 : word �i' of �array2'
    ttest `var1' = `var2'
}

Nick
[email protected]


Thank you Nick for your suggestions and corrections (really appreciated).
Unfortunately the code still does seem to work: 

. 
. local array1 bnp1 tnt1 ef2
. local array2 bnp2 tnt2 ef2
. 
. local n : word count `array1'
. forval i = 1/`n' {
  2.     local var1 : word �i' of �array1'
  3.     local var2 : word �i' of �array2'
  4.     ttest `var1' = `var2'
  5. }
invalid syntax
r(198);

where bnp? tnt? and ef? are three real variables of my dataset. 

Any ideas ? 

Diego


      ___________________________________ 
L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: http://it.docs.yahoo.com/nowyoucan.html

*
*   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