Code:
clear
input float(z x y dv iv)
3.3846154    5 3.2  4.944445 2.25
3.3846154    5 3.2 4.2222223    2
3.3846154    5 3.2  4.944445    2
3.3846154    5 3.2 4.3333335    2
3.3846154    5 3.2 4.7222223    2
3.3846154    5 3.2         4    2
3.3846154    5 3.2         4  2.5
3.3846154    5 3.2         4    2
        4 3.75 4.2  4.111111  3.5
        4 3.75 4.2 4.1666665 2.75
end
tempfile temp
save `temp'
foreach v of varlist x y z  {
        use `temp',clear
        tempfile file`v'
        local files "`files' file`v'"
        reg dv `v'
        gen coeffIV = el(r(table),1,1) 
        keep coeffIV
       save `file`v''
    }
append using `files'
0 Response to how to append results using tempfile?
Post a Comment