Hi all,
does anyone know what package to use to
fit a random-effects logit model? I've
checked out nlme but couldn't find it in
there...
best,
Holger
Omar Wasow wrote:
Hi Suzanna:
Clayton and Delia have answered the substantive part of your question,
but I thought it might be helpful to also note that your for-loop is
probably not working because the "3110" actually needs to written as
"1:3110" (assuming you want to start at 1).
Omar
On Mar 28, 2006, at 9:55 PM, Suzanna Chapman wrote:
Hi guys,
quick question on forward loops - I have used cbind to put two columns
of data together, and I want to fill a vector with the absolute values
of the difference between the two columns for each row. I know this
should be easy, but I'm not getting it to work - here's what I have but
it doesn't work - can someone tell me what I'm missing? thanks! - Suzanna
vector<-c()
for (i in 3110) {
vector[i] <- abs(diversity.clean[i,1]-diversity.clean[i,2])
}
On Wed, 29 Mar 2006, Bilal Khan wrote:
Hi Ian
So sorry to bother you again. Actually this stuff is so important that I
would like to make sure that I understand it properly. I dont know why I
have problem understanding it; perhaps due to non familiarity with
various
notations or matrix algebra, whatever, but I really want to understand it
properly and that is why I am giving you some problem. I really
appreciate
your help on this.
Okay! I have gone through the notes and the article and every thing
but I am
still not clear. What do you mean when you say "you can use the draws
of the
coefficient to simulate uncertainty about these fitted values" or when
Gary
says in his article on page three and point 2 "Draw one value of the
vector .... ...from the multivariate normal distribution in Equation 4.
Denote the ......."
and points 3 nad 4 on the same page
3. Taking the simulated effect .......
4. Simulate the outcome variable Y hat........
Can you give me an example of two or three random draws using the Logit
model from Gary,s article the one he simulated from NES study by
Rosenstone and Hanson. What I really did not understand was *how he
repeated
for each case the expected value algorithm M = 1000 times to
approximate a
99 percent confidence intervals around the probability of voting.*
I would reaaly appreciate your help. Thanks again
Bilal
On 3/28/06, Ian Brett Yohai <yohai(a)fas.harvard.edu> wrote:
>
> Hi Bilal,
>
> If you look at the section7 handout (in the Sections folder on the
> course
> website), there are a few examples that does what I think you would
> like.
> See subsection 4 called "R code" and also subsection 5 which shows how
> the Zelig syntax works for this type of thing.
>
> In your particular example, I don't see a 'race' term in your logit
> equation. You can estimate a logit with income, race, and education on
> the right hand side. Then when you simulate a first difference, you can
> hold income and education at their means, while changing race presumably
> from a zero to 1 if you have race coded as a dummy variable. In Zelig
> this is achieved by using two setx commands - again, see subsection 5 of
> the section 7 handout.
>
> On your last point about changing from 45% to 50% turnout, I'm not
> sure I
> follow entirely. But you can play around by changing the levels of
> education in your first difference setup, while holding the other
> variables at means (or at some other values that you deem substantively
> important) and computing the effect on turnout.
>
> You need to take draws from a multivariate normal distribution to make
> this work, so I definitely would suggest moving to R.
>
> Best,
> Ian
>
>
> On Tue, 28 Mar 2006, Bilal Khan wrote:
>
>> Hi All
>>
>> Can somebody help me to understand the two types of simulation that
>> Gary
>> gave lecture on. I am still bit confused. I use SPSS for my logit works
> but
>> I strongly believe that we have to move beyond calculating simple betas
> and
>> odds and give quantities of interest along with uncertainity.
>>
>> Suppose Beta = .0250I for education and Beta = .06531 for income in a
>> logistic regression equation: Logit (turnout) = .02501 education +
> .06531
>> income. I would like to know through an example how would you simulate
> the
>> impact of race on turnout
>>
>> 1. while holding constant income and education at their means.
>> 2. with income bracket of 30,000 to 45,000 dollars and less than high
> school
>> of education.
>>
>> Can somebody give example by drawing three to four samples?
>>
>> Also many times when you have predicted probabilities of voting in an
>> election for a data set using logistic regression model for each
>> case in
> the
>> sample of a state or an area and after considering probability of less
> than
>> .50 not voting and more than .50 voting, how can you show the impact of
>> changing a value of the parameter e.g. education with less than high
> school
>> to all the sample having atleast high school education, on the
>> predicted
>> turnout of say 45 percent for the sample.
>> That is I would like to say that changing a certain parameter (kind of
> first
>> difference) the total turnout would improve from 45 percent to 50
> percent or
>> whatever.
>>
>> I know I can do that in SPSS but it wont give me uncertanity or
> confidence
>> intervals: which most of the analysts dont give for such type of "what
> if
>> analysis" I am going through the work of Wolfinger and Rosentone "Who
>> votes"; excelent work but no confidence interval levels or uncertanity
> in
>> explaining their quantities of interest claculating through probit.
>>
>> How can you use Zelig for producing such quantities of interest?
>>
>> Bilal
>>
> _______________________________________________
> gov2001-l mailing list
> gov2001-l(a)lists.fas.harvard.edu
>
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
>
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
Omar Wasow
M.A.-Ph.D. Candidate
Department of African and African American Studies
Department of Government
Harvard University
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu
http://lists.fas.harvard.edu/mailman/listinfo/gov2001-l
--
Holger Lutz Kern
Graduate Student
Department of Government
Cornell University
Institute for Quantitative Social Science
Harvard University
1737 Cambridge Street N350
Cambridge, MA 02138
_______________________________________________
gov2001-l mailing list
gov2001-l(a)lists.fas.harvard.edu