Hi all,
Are there any R codes implementing Heckman selection models when the
dependent variable at the second stage is a binary variable? The authors of
the paper I and my partner are trying to replicate used the "heckprob"
command in STATA, and we've been trying to find comparable commands in R.
Thanks,
Eunmi
Eunmi Mun
Ph.D. Candidate
Harvard University Sociology Dept.
William James Hall 574
Cambridge, MA 02138
Phone (office): 617-496-3695
Hi all,
We're having trouble loading our STATA data into R.
We used library(foreign()) then loaded using read.dta(), but we seem to be
having memory usage issues (the STATA file is only 51mb, but we come back
with errors):
> read.dta("C:\\Documents and Settings\\Hai
Tiet\\Desktop\\bits_io2006.dta")--max-mem-size
Error: cannot allocate vector of size 4067 Kb
In addition: Warning messages:
1: Reached total allocation of 958Mb: see help(memory.size)
2: Reached total allocation of 958Mb: see help(memory.size)
3: Reached total allocation of 958Mb: see help(memory.size)
4: Reached total allocation of 958Mb: see help(memory.size)
I thought -max-mem-size uses the maximum memory allowed, but I still get
errors. Any suggestions?
~Hai
I'm having a problem with the setx() command in Zelig when my regression
includes a factor variable with more than one mode. I get the following
error message:
Warning message:
There is more than one mode. The first level is selected. in:
FUN(X[[1]], ...)
which is fine, but the problem is that Zelig doesn't pick the first
level, it just returns a vector with nothing in it (for any of the
variables, not just the factor).
Any ideas?
Matt
hi all,
we *do* have sections today (several people asked me about it given that
there is spring break next week). Justin and I will also both have
office hours next week (as it looks now, the usual time/place) for any
last-minute paper questions or more general questions/concerns.
cheers,
Holger
--
Holger Lutz Kern
Graduate Student
Department of Government
Cornell University
Institute for Quantitative Social Science
Harvard University
1737 Cambridge Street N350
Cambridge, MA 02138
www.people.cornell.edu/pages/hlk23
I'm having a few second thoughts on interpreting my Zelig first differences
output. I'm basically getting something in my output that looks like this:
First Differences: P(Y=j|X1)-P(Y=j|X)
mean sd 2.5% 97.5%
1 0.13002 0.07375 -0.015032 0.275292
2 0.01048 0.01005 -0.002703 0.034747
3 -0.08027 0.04556 -0.164719 0.008768
4 -0.06023 0.03637 -0.134939 0.006545
Am I right in saying that this is telling me that a change from X to X1
results in a 13% increase in the chance that a respondent will give Answer
#1? Likewise, is this output telling me that the change from X to X1 results
in a 1% increase in the chance that a respondent will give Answer #2?
that's the way I'm reading this output and it seems to make sense that way.
but I might be wrong--I don't have much familiarity with Zelig or with first
differences analysis.
thanks,
Maya
There has been some confusion in the lab over what exactly this line of code
does and means:
beta <- par[1:ncol(X)]
Can anyone please explain clearly and in writing ("so I can convince myself
of it later") what this is doing, and why it makes my functions work?
Thanks,
Jill
Hi!
in the codebook, black is coded one/two, however, in the dataset, it's
coded zero/one. In the latter which one refers to black and to other race?
Lucia
Hi all,
here are the readings for next lecture (April 2nd):
King, Gary and Langche Zeng. 2006. "The Dangers of Extreme
Counterfactuals." Political Analysis 14 (2): 131-159
http://gking.harvard.edu/files/counterft.pdf
Daniel Ho, Kosuke Imai, Gary King, and Elizabeth Stuart. 2007. "Matching
as Nonparametric Preprocessing for Reducing Model Dependence in
Parametric Causal Inference." Fortcoming, Political Analysis.
http://gking.harvard.edu/files/matchp.pdf
cheers,
Holger
--
Holger Lutz Kern
Graduate Student
Department of Government
Cornell University
Institute for Quantitative Social Science
Harvard University
1737 Cambridge Street N350
Cambridge, MA 02138
www.people.cornell.edu/pages/hlk23
Hi,
My density estimate for the first difference in probability (question 1.3)
looks OK, except it has a really tall spike of values around 0.0.
With my background in electronic engineering, I saw this and thought I
should try to pass it through some kind of low-pass filter. However, I?m
guessing this isn?t the answer. (Removing 0s and 1s from the two vectors of
probabilities I took the difference of to get the first difference vector,
and running plotting a density plot of this produced something with a
smaller 0.0 spike, suggesting a better signal:noise ratio, so conceptually
my engineering approach *could* work...)
I?m not sure how to ask questions about this without giving away too much
detail about what I?ve done (which might be mostly correct) and what my
first differences estimate is (which appears reasonable).
I am, apparently, the only person doing this course in the UK. So far I seem
to have been keeping pace on my own. However, it would be good to have a few
people I could work with on the problem set, so I don?t end up emailing this
mailing list so often, and/or get stuck on the kinds of little problems
which are much easier to see with a fresh pair of eyes.
If you think you could offer some advice, let me know.
Best wishes,
Jon Minton
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.13/726 - Release Date: 18/03/2007
15:34