Hi, everyone.
Just to be clear: If you need anything over break, you should
not hesitate to email. If you need to see me in person, I'll be
in the office Friday, January 7th from 1pm to 3pm for last
minute problems. Otherwise, have a wonderful break!
Yours, Olivia
Suppose I have several dataframes: g1, g2, g3....
Each as the same variable names: X, Y....
I want to write a function that can deal with variables across the
dataframes. The easiest way that I can think of to do it would be to
write a function that could walk through each dataframe and do stuff
to the variables, something like:
mush.data <- function(varname, numgroups) {
for(i in 1:numgroups) {
SomeFunction(paste("g", i, "$",varname)
}
BUT - paste just gives me a string. How do I get R to realize that
it's actually pointing to a vector? I feel that R should let me do
this, right?
Any help would be greatly appreciated.
/\llan
Yes, you can use zelig for the final paper, but you still need to write out the model that you are estimating -- stochastic component and systematic component.
Gary will lecture on cross-cultural comparability in survey responses on monday.
Have a good weekend...
Olivia
----- Original Message -----
From: wei ha
To: gov2001-l(a)lists.fas.harvard.edu
Sent: Saturday, December 18, 2004 6:53 PM
Subject: clarification on the paper improvement
Hi Gary and Olivia,
I have a clarification question on improving the paper. Can we use Zelig to do that if it has been included or we have to write out the loglikelihood function on our own and use optim to get the coefficient estimates?
Btw, what's the topic of Monday's lecture? Thanks.
Wei
Sincerely,
Wei Ha
PhD Candidate in Public Policy
Harvard University
Fax: 1-801-605-1455
I am trying to implement panel corrected standard errors (pcse) in R
where there is missing data. Does anyone know of an existing program
that does this so I don't have to write it myself?
Franzese has done this in Gauss
http://www-personal.umich.edu/~franzese/pcse.documentation.pdf.
I am basically trying to replicate Stata's xtpcse.
Thanks,
Andy
----- Original Message -----
From: Cindy Dorsey
To: gov2001-l(a)fas.harvard.edu
Sent: Wednesday, December 15, 2004 12:05 PM
Subject: Fwd: your mail
I am sending this e-mail as per Gary King's suggestion. I am looking for statistical consultation along the lines of what I described to Gary in my e-mail to him contained here--
Pls contact me at your earliest convenience-
thank you-
Cindy Dorsey
Begin forwarded message:
From: Gary King <king(a)harvard.edu>
Date: December 14, 2004 8:46:45 PM EST
To: Cindy Dorsey <cdorsey(a)mclean.harvard.edu>
Subject: Re: your mail
Reply-To: Gary King <king(a)harvard.edu>
Hi there. We don't have a general consulting service set up, but lots of
people seem to hire students from a class I teach. What I usually suggest
is to email Gov 2001 <gov2001-l(a)fas.harvard.edu> and send a description of
what you are looking for. Most of them could help you out, although there
will be some translation issues since they'll use different terms for some
of the models than you do. Some might need to figure out the models
you're talking about, but most would certainly have the ability and skills
to do it. Let me know if that doesn't work out as sometimes there are
others around. And sometime you should come and give a talk at our seminar
(see http://www.courses.fas.harvard.edu/~gov3009/).
Best,
Gary
: Gary King, King(a)Harvard.Edu http://GKing.Harvard.Edu :
: Center for Basic Research Direct (617) 495-2027 :
: in the Social Sciences Assistant (617) 495-9271 :
: 34 Kirkland Street, Rm. 2 HU-MIT DC (617) 495-4734 :
: Harvard U, Cambridge, MA 02138 eFax (617) 812-8581 :
On Mon, 13 Dec 2004, Cindy Dorsey wrote:
Dear Dr. King,
I just came across your website and wondered whether you might help me--
I am looking for statistical consultation-- I do sleep research and am
trying to analyze a dataset that involves multiple nights of
polysomnography, MR spectroscopy, performance testing, etc. for each
subject. I'm pretty sure that what I need to do is non-linear mixed
effects regression analysis or time series analysis, but I need some
guidance-- do you, or does anyone you know do consulting for local
researchers ? I am located at McLean Hospital-
thank you-
Cynthia Dorsey, PhD
Cynthia M. Dorsey, Ph.D.
Assistant Professor, Harvard Medical School
Director, Sleep Research Program
McLean Hospital
115 Mill Street
Belmont, MA 02478
Phone 617-855-3194
Fax 617-855-3711
Any information, including protected health information (PHI), transmitted
in this email is intended only for the person or entity to which it is
addressed and may contain information that is privileged, confidential and or
exempt from disclosure under applicable Federal or State law. Any review,
retransmission, dissemination or other use of or taking of any action in
reliance upon, protected health information (PHI) by persons or entities other
than the intended recipient is prohibited. If you received this email in error,
please contact the sender and delete the material from any computer.
Cynthia M. Dorsey, Ph.D.
Assistant Professor, Harvard Medical School
Director, Sleep Research Program
McLean Hospital
115 Mill Street
Belmont, MA 02478
Phone 617-855-3194
Fax 617-855-3711
Can anyone help me understand why my setx function isn't doing what I
thought it would?
I'm doing part 2a.
> x.out0<- setx(z.out, fn= NULL, phone =0)
> x.out0[1:10,]
(Intercept) phone
1 1 1
2 1 0
3 1 1
4 1 0
5 1 1
6 1 1
7 1 1
8 1 1
9 1 1
10 1 1
I thought this would produce all 0's in the phone column of x.out0,
but clearly it didn't.
Thank you!
Andy
Hello all,
Thanks for the help on setx() before.
I think I am having a problem with passing arguments into a function.
I want my function to have a line that says
tt<- teh[,gg.r$treat==1]
for various "treat"s. (this is for generating the ATT -- the columns
of teh where the treatment was applied.) So my function is like
at.func<- function(arg1, arg2, treat, arg4) {
. . .
tt<- teh[,gg.r$treat==1]
. . .
}
When I do this for a particular value of treat outside of the function, ie,
tt<- teh[,gg.r$phone==1]
it works fine, but in passing the argument within the function it
seems to not understand this. (tt is empty). Can anyone help me with
this?
Andy
Hi, everyone. Looks like ice4 went down about 9am today. If you had a
session on ice4, you will have to restart it. Just log in (to ice4 or any
other iceX machine) and type:
vncserver
Yours,
Olivia.