i think you may actually need to cbind them...
your data is actually your two matrices that you fed into your optim
function, minus the two intercepts
so something like this
cbind(data$marriage, data$phd, data$...etc all the expl variables noted in
2.3)
the cfact, in 3.1, is just
cbind(0, median(data$gender), median(data$phd)...etc all the explanatory
variables)
cbind(1, median(data$gender), median(data$phd)...blah blah)
And then you stick that into yr whatif()....I hope that helps (and i hope
that's right...)
--sp
On Wed, Apr 8, 2009 at 5:25 PM, Lee, Clarence <clee at hbs.edu> wrote:
Hi all,
I?m a bit confused on what we should use as the data and what we should use
as the counterfactual in problem 3.1.
This is what I have:
data = biochem
Then for the counterfactual. I have the two individuals from 2.4 define
as:
single.subject <- c("art"=mean(Exp.Y.single),
"kid5"=median(bioChemists$kid5), "phd"=median(bioChemists$phd),
"ment"=median(bioChemists$ment),
"fem.binary"=median(bioChemists$fem.binary), "mar.binary"=0)
married.subject <- c("art"=mean(Exp.Y.married),
"kid5"=median(bioChemists$kid5), "phd"=median(bioChemists$phd),
"ment"=median(bioChemists$ment),
"fem.binary"=median(bioChemists$fem.binary), "mar.binary"=1)
then I rbind these two observations to be the counterfactual.
Could someone let me know if I?m on the right path?
Thanks,
Clarence
*Clarence Lee** | Doctoral Student | Harvard Business School |
857.998.2034*
_______________________________________________
gov2001-l mailing list
gov2001-l at
lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l