Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: saving coefficients from ANOVA


From   <[email protected]>
To   <'[email protected]'>
Subject   st: saving coefficients from ANOVA
Date   Tue, 14 Jul 2009 16:59:58 +0100

Good afternoon, 
 
Apologies if this has been answered before, I haven't been able to find anything.

I am trying to write a programme that estimates differences between two groups (var condition) using ANCOVA, first for costs, then for effectiveness. This programme should then be run within the bootstrap command. The output I need is replications of paired cost differences and effectiveness differences. However, I can't seem to work out how to save the coefficient of group difference as a scalar (to a new dataset).

Below is what I've got so far, I'm sure there is a fairly simple solution to this but I am new to STATA and any help would be appreciated.

With best wishes,

Eva




capture program drop bscer 
program define bscer

anova t2totalco t1totalco condition, continuous(t1totalco)
???? (save coefficient to bcd)

anova tariffch bstariff Conditio, continuous(bstariff)
???? (save coefficient to bqd)


end

clear
use "data.dta"
bootstrap "bscer t2totalco t1totalco condition tariffch bstariff" "bcd bqd", reps(1000) saving(bootstrapped.dta) replace strata(condition) notable
clear

Please access the attached hyperlink for an important electronic communications disclaimer: http://www.lse.ac.uk/collections/secretariat/legal/disclaimer.htm

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



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index