Hey all,
I'm trying to run a negative binomial model in R. It runs clean in stata, but in R, it gives me:
Error: no valid set of coefficients has been found: please supply starting values
In addition: Warning message:
In glm.fitter(x = X, y = Y, w = w, start = start, etastart = etastart, :
fitted rates numerically 0 occurred
Anyone know how to provide starting values to make this run? This model spec does work in STATA. . .
EXL
--
ERIC LIN
Technology and Operations Management
Harvard Business School
Boston, MA 02163
elin at hbs.edu
for problem 1.2, should we be able to drop the d_i parameter for the final log likelihood? There are lots of variables here, so for a quick check, should the final expression be in terms of x, beta, z, \gamma y, and n?
thanks!
EXL
--
ERIC LIN
Technology and Operations Management
Harvard Business School
Boston, MA 02163
elin at hbs.edu
mobile: +1.216.225.2545
really basic question on using R:
does anyone know how to do a difference in means test in R?
Thanks!
EXL
--
ERIC LIN
Technology and Operations Management
Harvard Business School
Boston, MA 02163
elin at hbs.edu
mobile: +1.216.225.2545
Hi everyone -
For our replication, we'd like to do matching to improve causal
inference from our dataset, but it's a big survey with weights on each
observation. How does matching or CEM work in this context? Do we just
ignore the weights when matching and incorporate them in the final
analysis as normal?
-Michael
Hey Class,
I have some trouble interpreting the Probit coefficient estimates:
what does one unit's increase in the value of a given variable lead
to? Also, what is the R function for predicted probabilities from the
Probit outcome?
Many thanks.
Iza Ding
Hi everyone,
I'm trying to remember the LaTeX table generating packages recommended
by folks. I'd like to experiment with them for this assignment. Could
someone remind me which is/are good?
Thanks,
Jason
Hey everyone,
I have a question not related to the problem set. For the replication I have
created a loop to run through a bunch of my regressions. I've stored all the
variance-covariance matrices in a list object. Now that I have them, I want
to extract each matrix to put into my mvrnormal() funciton. however, I can't
seem to turn it back into a matrix. I've tried unlisting, calling a specific
element of the list, and everytime I try to do this or apply as.matrix() I
end up getting an error or something odd. This is the code I am working
with. Does anyone know how to properly unlist?
*loop
var <- vcov(out)
varmat<- list(varmat, var)
}
My code to try to unlist:
x<-as.matrix(unlist(lapply(varmat, t))[1])
I've also tried:
unlist(varmat[1])
unlist(varmat)[1]
Any help would be very much appreciated!
- Carly
--
Carly Knight
Ph.D. Student
Department of Sociology
Harvard University
Phone: (281) 682-4063
E-Mail: crknight at fas.harvard.edu
I found the log likelihood for problem 2A but I'm having problems with my
optim function. My function reads as follows:
y.vec <- data2$yearsinoffice
optim(par = .2, fn = mle, y = y.vec, control = list(fnscale = -1), method =
"L-BFGS-B", lower = 0, upper = Inf, hessian = TRUE)
But I get the following error:
Error in optim(par = 0.2, fn = mle, y = y.vec, control = list(fnscale = -1),
:
L-BFGS-B needs finite values of 'fn'
Can anyone offer some advice?
Question 1A asks us to evaluate the claim that grassroots activities increase voter turnout. It then asks us to "provide our results." My first inclination in evaluating the claim would be to look at a first difference of contacted versus not contacted, but that's exactly what 1B is asking. Is 1A essentially asking us to provide model parameter estimates (and, I guess, some evaluation of whether there's an interaction effect between "black" and "contact")?
Thanks,
Nick
What exactly do we substitute for gamma (as in what is the systematic
component)? Could someone give me a hint please?
Best,
Han
Harvard College Class of 2013
614-329-1324