Hey folks,
Hope you're making good progress on your replications. In anticipation of
section meeting tonight, we're asking that you turn in the following:
1. Hard copy of PDF and CD-ROM turned in in person. Your CD-ROM should have
the *data, the code, and the PDF* write-up saved on it.
2. Electronic copy of *PDF, data, and code* uploaded to the course website.
There is a folder called "Replication Draft" under course dropboxes that you
can turn this into. One per group is fine.
3. Unless your data are very large, we will also ask you to *email your PDF,
data, and code* to those students who are replicating your work. I will
circulate the list before section.
let me know if you have questions --
Maya
Hey class,
First of all I realize that I accidentally sent this email to the
Gov2000 list from last semester so I apologize for the spam for some
of you...
Here is the question:
Our team is looking for R functions for Panel-corrected Prais-Winsten
Estimates and Panel-corrected Prais-Winsten Estimates with fixed
effects. The Stata package for those are XTPCSE,AR1 and XTPCSE,AR1,FE,
but we can't find R functions to do this.
It would be great if someone knows the answer.
Iza
On behalf of our team:
If anyone else has had to deal with a weibull model, is there a way to
coerce Zelig's implementation of Weibull into one that uses the following
alternative form of Weibull (in Latex-ese):
h(t | x_t) = pt^{p-1}e^{X*beta}
It looks to me like Zelig is doing something significantly enough different
that I can't coerce it into the above model. :-/
Thanks,
Nick
If anyone else has had to deal with a weibull model, is there a way to coerce Zelig's implementation of Weibull into one that uses the following alternative form of Weibull (in Latex-ese):
h(t | x_t) = pt^{p-1}e^{X*beta}
It looks to me like Zelig is doing something significantly enough different that I can't coerce it into the above model. :-/
Thanks,
Nick
For the life of me I can't figure this out: how do evaluate a variable name before defining a formula for Zelig (also more generally for R)? For example, if a normal zelig command is something like:
zelig(a ~ x+y+z, data=data)
how would I do something like:
chosen_column <- "y"
zelig(a <- x+eval(chosen_column)+z, data=data)
(obviously the above doesn't work, but hopefully you can see what I'm getting at)
Thanks,
Nick
Hey folks,
Just a reminder -- if you have a preference about which paper you'd
like to re-replicate for next week's assignment (due next Thurs),
please enter in your preferences to the course website by 6pm tonight.
Also, everyone will be participating, not just those writing the
replication papers. (Basically, this re-replication assignment takes
the place of a regular problem set, so even extension students doing
the final project should be participating!)
best, Maya
Hi all,
We're running into a problem with the following function:
ll.normal <- function(par, X=X, Y=Y) {
beta <- par[1:ncol(X)]
sigma2 <- exp(par[ncol(X)+1])
-1/2 * (sum(log(sigma2) + (Y - (X%*%beta))^2/sigma2))
}
--
This seems to work fine, but when we try to use the function as an argument for another operation ("qaptest" in the "sna" package) we get the following class error:
OLSq <- qaptest(miz57,ll.normal,X=X,Y=Y,reps=1000)
Error in X %*% beta: requires numeric/complex matrix/vector arguments
--
Anyone have any thoughts on how to get X %*% beta into the appropriate form to do this operation?
Thanks very much,
Matt
Matthew Lee
Wyss House, Harvard Business School
Soldiers Field Road
Boston, MA 02163
tel: (1) 267 733-5242
mailto:mlee at hbs.edu | web: www.hbs.edu<http://www.hbs.edu/>
Using logit, if you don't use clustered ses ( but should) , will this
only change your SEs, or can this distort your coefficients as well?
--
ERIC LIN
Technology and Operations Management
Harvard Business School
Boston, MA 02163
elin at hbs.edu
[sent from mobile]
In R, is there any way to check to see what data was used when a model was run? For example, if there are na's in an lm() model, then lm drops them for the purposes of the regression. if we do lm$data, does it drop it there too? In orther words is nrow(lm$data) the number of obs that were used in the lm model?
STATA has a straightforward way to extract the obs that were used in the analysis (exluding the dropped). isXXX$data the equivalent in R?
or is there some other way to get this?
--
ERIC LIN
Technology and Operations Management
Harvard Business School
Boston, MA 02163
elin at hbs.edu
Hi All-
I discovered this neat R package called apsrtable that formats Latex tables
with coefficients and std. errors from multiple models with the std. errors
stacked under the coefficients in parentheses. The link to the description
is below. It saved me a some time today formatting our replication results,
so I thought I would pass it along.
http://cran.r-project.org/web/packages/apsrtable/index.html
Best,
Megan