Hi Chris,
You should be able to install make either from Apple's developer tools
or from Fink (using FinkCommander if you like a graphical interface).
Good luck,
Kosuke
-----------------------------------------------------
Kosuke Imai Office: Corwin Hall 041
Assistant Professor Phone: 609-258-6601
Department of Politics eFax: 973-556-1929
Princeton University Email: kimai(a)Princeton.Edu
Princeton, NJ 08544-1012 http://imai.princeton.edu
-----------------------------------------------------
On Mon, 7 Nov 2005, Olivia Lau wrote:
> ---------- Forwarded message ----------
> Date: Mon, 7 Nov 2005 11:44:45 -0600
> From: Chris Haid <haid(a)uchicago.edu>
> To: Olivia Lau <olau(a)fas.harvard.edu>
> Subject: Re: VGAM install problems
>
> I believe I have downloaded the g77 compiler correctly (it is installed
> in usr/local, I believe). Still no luck on compiling VGAM from
> scratch. I get an error on a 'make' command, which leads me to believe
> that the I need the apple developer tools. Any idea if these can be
> downloaded and installed, and for that matter which set of tools I
> would need?
>
> On the VGAM install error, here is what I get back from the system
> after running R CMD INSTALL VGAM_0.6-5.tar.gz from a unix command line:
>
> wireless-198-24:~/Desktop chrishaid$ R CMD INSTALL VGAM_0.6-5.tar.gz
> * Installing *source* package 'VGAM' ...
> ** libs
> /Library/Frameworks/R.framework/Resources/bin/SHLIB: line 1: make:
> command not found
> ERROR: compilation failed for package 'VGAM'
> ** Removing
> '/Library/Frameworks/R.framework/Versions/2.2/Resources/library/VGAM'
>
>
> Thoughts?
>
> c
>
> On Nov 7, 2005, at 10:26 AM, Olivia Lau wrote:
>
> > Dear Chris,
> >
> > I've asked Thomas to create the appropriate directories on his website
> > so that the script will work in the future -- thanks for bringing this
> > to our (collective) attention.
> >
> > In the meanwhile, you can compile VGAM from scratch (as you attempted
> > below). You need to have the g77 compiler installed, however, for
> > this to work. See
> > http://gking.harvard.edu/zelig/docs/Why_can_t_I.html (the second
> > bullet) for how to do this. You might also need to have the Apple
> > developer tools installed -- I'm not sure for 10.3.9, but some
> > versions give you the option of not installing the tools when you
> > first startup.
> >
> > Hope this helps. Best,
> >
> > Olivia
> >
> > ----- Original Message ----- From: "Chris Haid" <haid(a)uchicago.edu>
> > To: "Thomas Yee" <t.yee(a)auckland.ac.nz>
> > Cc: <olau(a)fas.harvard.edu>
> > Sent: Monday, November 07, 2005 8:30 AM
> > Subject: Re: VGAM install problems
> >
> >
> >> Thanks for the quick reply, Thomas. I am cc'ing olivia on this eamil
> >>
> >> No luck. I am still getting the 404 Not Found error when I run either:
> >> o the zelig install
> >> (source("http://gking.harvard.edu/zelig/install.R")) or
> >> o the VGAM install (install.packages("VGAM",
> >> repos="http://www.stat.auckland.ac.nz/~yee").
> >>
> >>
> >> Olivia, do you have any ideas (see emails below).
> >>
> >> All the best,
> >>
> >> Chris Haid
> >>
> >> On Nov 6, 2005, at 10:20 PM, Thomas Yee wrote:
> >>
> >>> Chris Haid wrote:
> >>>
> >>>>
> >>>> Prof. Yee--
> >>>>
> >>>> Installing VGAM (to use with Gary King's Zelig) has been giving me
> >>>> fits.
> >>>>
> >>>> Original install from Zelig install failed.
> >>>>
> >>>> Trying to install VGAM form within R with (install.packages("VGAM",
> >>>> repos="http://www.stat.auckland.ac.nz/~yee"), fails with these
> >>>> errrors:
> >>>> Warning message:
> >>>> cannot open: HTTP status was '404 Not Found'
> >>>> Warning: unable to access index for repository
> >>>> http://www.stat.auckland.ac.nz/~yee/bin/macosx/2.1
> >>>> Warning message:
> >>>> no package 'VGAM' at the repositories in: download.packages(pkgs,
> >>>> destdir = tmpd, available = available,
> >>>>
> >>>>
> >>>> Downloading VGAM and running R CMD INSTALL VGAM yields:
> >>>> * Installing *source* package 'VGAM' ...
> >>>> ** libs
> >>>> /Library/Frameworks/R.framework/Resources/bin/SHLIB: line 1: make:
> >>>> command not found
> >>>> ERROR: compilation failed for package 'VGAM'
> >>>> ** Removing
> >>>> '/Library/Frameworks/R.framework/Versions/2.1.1/Resources/library/
> >>>> VGAM'
> >>>> ** Restoring previous
> >>>> '/Library/Frameworks/R.framework/Versions/2.1.1/Resources/library/
> >>>> VGAM'
> >>>>
> >>>>
> >>>> I am running Mac OS X 10.3.9 on an iBook G4
> >>>>
> >>>> Any thoughts?
> >>>>
> >>>> All the best,
> >>>>
> >>>> Chris Haid
> >>>> --Apple-Mail-18-536593605
> >>>> Content-Transfer-Encoding: 7bit
> >>>> Content-Type: text/enriched;
> >>>> charset=US-ASCII
> >>>>
> >>>> Prof. Yee--
> >>>>
> >>>>
> >>>> Installing VGAM (to use with Gary King's Zelig) has been giving me
> >>>> fits.
> >>>>
> >>>>
> >>>> Original install from Zelig install failed.
> >>>>
> >>>>
> >>>> Trying to install VGAM form within R with
> >>>> (<fontfamily><param>Courier</param><x-tad-
> >>>> bigger>install.packages("VGAM",
> >>>> repos="http://www.stat.auckland.ac.nz/~yee"), fails with these
> >>>> errrors:
> >>>>
> >>>> Warning message:
> >>>>
> >>>> cannot open: HTTP status was '404 Not Found'
> >>>>
> >>>> Warning: unable to access index for repository
> >>>> http://www.stat.auckland.ac.nz/~yee/bin/macosx/2.1
> >>>>
> >>>> Warning message:
> >>>>
> >>>> no package 'VGAM' at the repositories in: download.packages(pkgs,
> >>>> destdir = tmpd, available = available, </x-tad-bigger></fontfamily>
> >>>>
> >>>>
> >>>>
> >>>> Downloading VGAM and running R CMD INSTALL VGAM yields:
> >>>>
> >>>> * Installing *source* package 'VGAM' ...
> >>>>
> >>>> ** libs
> >>>>
> >>>> /Library/Frameworks/R.framework/Resources/bin/SHLIB: line 1: make:
> >>>> command not found
> >>>>
> >>>> ERROR: compilation failed for package 'VGAM'
> >>>>
> >>>> ** Removing
> >>>> '/Library/Frameworks/R.framework/Versions/2.1.1/Resources/library/
> >>>> VGAM'
> >>>>
> >>>> ** Restoring previous
> >>>> '/Library/Frameworks/R.framework/Versions/2.1.1/Resources/library/
> >>>> VGAM'
> >>>>
> >>>>
> >>>>
> >>>> I am running Mac OS X 10.3.9 on an iBook G4
> >>>>
> >>>>
> >>>> Any thoughts?
> >>>>
> >>>>
> >>>> All the best,
> >>>>
> >>>>
> >>>> Chris Haid
> >>>>
> >>> Dear Chris,
> >>>
> >>> sorry I'm not sure about the cause of your problem.
> >>> Maybe the Auckland server was down when you tried it.
> >>>
> >>> I think it may be because zelig wants version 0.6-4, which is a bit
> >>> old
> >>> (0.6-5 is the latest) and I changed the permissions of the old
> >>> version.
> >>> Anyhow, I've rechanged the permissions, so if that is the problem,
> >>> it should now work. Please try again!
> >>> If that doesn't work, then you might want to contact the zelig
> >>> group, e.g., Olivia Lau at olau(a)fas.harvard.edu, because it might
> >>> be a zelig problem.
> >>>
> >>> cheers
> >>>
> >>> Thomas
> >>>
> >>>
> >
>
-
Zelig Mailing List, served by Harvard-MIT Data Center
Send messages: zelig(a)latte.harvard.edu
[un]subscribe Options: http://lists.hmdc.harvard.edu/?info=zelig
Zelig program information: http://gking.harvard.edu/zelig/
(see below)
Zelig combines quantities of interest from multiply imputed data sets.
ANOVA tables aren't really quantities of interest; they are normally
intermediate quantities. you can take the combined simulations tho and
compute any quantity you might like.
on your other question, we're putting multilevel models and many others in
Zelig now.
Gary
On Sun, 27 Nov 2005, Leo Gürtler wrote:
> Gary King wrote:
>
> Dear Prof King,
> thank you very much, this looks very interesting. I immediately tried Zelig
> but encountered a problem while trying anova on multiple imputed datasets
>
> this anova works without any imputation:
>
>>
>> data(macro)
>>
>> # Estimate model:
>>
>> z.out1 <- zelig(unem ~ gdp + capmob + trade, model = "normal",
> + data = macro)
>>
>> summary(z.out1)
>
> Call:
> zelig(formula = unem ~ gdp + capmob + trade, model = "normal",
> data = macro)
>
> Deviance Residuals:
> Min 1Q Median 3Q Max -5.301 -2.077 -0.319 1.979 7.772
> Coefficients:
> Estimate Std. Error t value Pr(>|t|) (Intercept) 6.18129
> 0.45057 13.72 < 2e-16 ***
> gdp -0.32360 0.06282 -5.15 4.4e-07 ***
> capmob 1.42194 0.16644 8.54 4.2e-16 ***
> trade 0.01985 0.00561 3.54 0.00045 ***
> ---
> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
>
> (Dispersion parameter for gaussian family taken to be 7.543)
>
> Null deviance: 3664.8 on 349 degrees of freedom
> Residual deviance: 2609.9 on 346 degrees of freedom
> AIC: 1706
>
> Number of Fisher Scoring iterations: 2
>
>> anova(z.out1)
> Analysis of Deviance Table
>
> Model: gaussian, link: identity
>
> Response: unem
>
> Terms added sequentially (first to last)
>
>
> Df Deviance Resid. Df Resid. Dev
> NULL 349 3665
> gdp 1 428 348 3237
> capmob 1 532 347 2705
> trade 1 95 346 2610
> :
>
>
> -> this does not work:
>
>> data(immi1, immi2, immi3, immi4, immi5)
>> z.out <- zelig(ipip ~ wage1992 + prtyid + ideol,
> + model = "normal",
> + data = list(immi1, immi2, immi3, immi4, immi5))
>>
>>
>>
>> summary(z.out)
>
> Model: normal
> Number of multiply imputed data sets: 5
>
> Combined results:
>
> Call:
> zelig(formula = ipip ~ wage1992 + prtyid + ideol, model = "normal",
> data = list(immi1, immi2, immi3, immi4, immi5))
>
> Coefficients:
> Value Std. Error t-stat p-value
> (Intercept) 3.43930 0.09233 37.2483 4.810e-92
> wage1992 -0.24000 0.13256 -1.8105 7.724e-02
> prtyid 0.00967 0.01405 0.6885 4.965e-01
> ideol 0.05795 0.02156 2.6878 1.425e-02
>
> For combined results from datasets i to j, use summary(x, subset = i:j).
> For separate results, use print(summary(x), subset = i:j).
>
>> anova(z.out)
> Fehler in anova(z.out) : keine anwendbare Methode für "anova"
> ^^^^^^^^^^^
>
> Is there a trick to get anovas with multiple imputed datasets pooled by
> Zelig? (anova is not mentioned in the docu)
> Last: is Zelig compatible with lme from Peinheiro&Bates, i.e.is it possible
> to fit multilevel models?
>
> thanks a lot,
> best
>
> leo gürtler
>
>> the trick is to think of the final quantity of interest you might want and
>> to combine according to rubin's rules or, much more conveniently, by
>> simulation. Zelig or clarify will do that automatically for you.
>>
>> Best if luck with your research,
>> Gary King
>> -----Original Message-----
>> From: "=?ISO-8859-1?Q?Leo_G=FCrtler?=" <leog(a)anicca-vijja.de>
>> Date: Saturday, Nov 26, 2005 10:22 am
>> Subject: question related to multiple imputation
>>
>> Dear Prof. King,
>>
>>
>> I visited your webpage on missing data, because I am searching for a method
>> to pool Anova tables and to estimate effect-size and power of a mixed
>> effect model in case of multiple imputation. I am not an statistician but a
>> psychologist. I work with R but for that I did not found a module which
>> seems to fulfill this need.
>>
>> (1) after pooling the estimates of beta coefficients (e.g. by using pool()
>> from MICE or mi.inference() from NORM in R), is this also necessary for
>> p-values of F-statistics, i.e. how to pool ANOVAS in R? Or is it ok if the
>> betas are statistical significant to proceed with the ANOVA from single
>> imputation? It should not, but how to to pool the F-statistics etc as
>> described by Rubins rules. For that it is only possible with a
>> standarderror of F-statistics, but how to obtain them?
>>
>> (2) How to proceed in the same manner with AIC/ BIC/ loglik that are
>> criteria in linear mixed effect models (Pinheiro&Bates)? How to obtain
>> standard errors for these statistics?
>>
>> (3) How to proceed with the determination of effect sizes/ power? Are there
>> formulas or how to do this empirically with multiple imputaiton? So far,
>> what I do not understand is how to implement some kind of effect size for
>> the detection of sample differences.
>>
>> (4) how "good" is multiple imputation compared to bootstrapping a single
>> imputation? According to literature, about 5-10 imputations are enough to
>> get unbiased estimates by pooling the results according to Rubins-rules.
>> But these rules are quite simple so that I thought "why not boostrap via
>> the residuals?", i.e.
>>
>> a) pooling the data _prior_ to the data analysis by averaging over the
>> imputations and then
>> b) bootstrapping this dataset with the residuals like
>>
>> 1- fit model1
>> 2- determine p value
>> 3- model2 = fit_model1 + bootstrap(residuals_model1)
>> 4- fit model2
>> 5- repeat 1-4 for x times (number of simulations)
>> 6- plot p-values to determine power
>>
>> Thank you very much for your answer. I hope it is ok to ask you these
>> questions (maybe there are quite simple for a statistician), but after
>> thinking alone I decided that it is necessary to search for a reasonable
>> answer by contacting people. In my environment I do not know anybody who
>> can answer my questions.
>>
>> With best regards,
>>
>> Leo Gürtler / Germany (Berg)
>>
>> PS: I know that measureing effect sizes in this proposed way is a post-hoc
>> procedure and therefor not the best way at all, but in this case
>>
>>
>>
>
>
>
-------- Original Message --------
Subject: as.factor in normal.bayes
Date: Thu, 10 Nov 2005 14:28:54 -0500
From: ying lu <ylu(a)iq.harvard.edu>
Reply-To: ylu(a)iq.harvard.edu
To: aleman(a)fordham.edu, zelig(a)mail-1.hmdc.harvard.edu
Hi Jose,
To use 'as.factor' option in normal.bayes, pls refer to the following
example:
> z.out2<-zelig(unem~gdp+trade+as.factor(year)+as.factor(country), model="normal.bayes", data=macro)
> summary(z.out2)
If you have any questions about as.factors( ), pls refer to the R help file.
Ying
-------- Original Message --------
Subject: Re: question to zelig developers (fwd)
Date: Wed, 9 Nov 2005 11:43:57 -0500 (EST)
From: Kosuke Imai <kimai(a)Princeton.Edu>
To: Ying Lu <ylu(a)iq.harvard.edu>
CC: Olivia Lau <olau(a)fas.harvard.edu>
Ying,
Is it true that "as.factor" does work in nomal.bayes? If it does, can
you send a response to zelig email list with cc to Jose?
Thanks,
Kosuke
---------- Forwarded message ----------
Date: Wed, 09 Nov 2005 11:39:28 -0500
From: aleman(a)fordham.edu
To: Kosuke Imai <kimai(a)Princeton.EDU>
Subject: Re: question to zelig developers
as.factor does not seem to work. I'll see what this means for my model.
J
Kosuke Imai <kimai(a)Princeton.Edu>
11/08/2005 06:41 PM
To
aleman(a)fordham.edu
cc
Subject
Re: question to zelig developers
good. you don't need stata.data$ thing. just enter the variable name.
Maybe, then as.factor will work.
K
On Tue, 8 Nov 2005 aleman(a)fordham.edu wrote:
> Hi Kosuke,
>
> Good seeing you today. You are right, the script works, but only if I
avoid as.factor() variables like country or
> year dummies. That's when I get the message
>
> Error in eval(expr, envir, enclos) : NA/NaN/Inf in foreign function call
(arg 17)
>
> I guess a way to get around this would be to try to change priors and
estimate then directly. I still wonder
> though why it won't let me use as.factor () variables.
>
> Jose
>
>
>
> Call: zelig(formula = stata.data$utip ~ stata.data$wcoord +
stata.data$labmgmt +
> stata.data$tnchs + stata.data$tnclc + stata.data$govtints +
> stata.data$wagecoor + stata.data$sstran + stata.data$netu +
> stata.data$cg + stata.data$openk + stata.data$capital +
stata.data$egrowth,
> model = "normal.bayes", data = stata.data)
>
> Iterations = 1001:11000
> Thinning interval = 1
> Number of chains = 1
> Sample size per chain = 10000
>
> Mean, standard deviation, and quantiles for marginal posterior
distributions.
> Mean SD 2.5% 50% 97.5%
> (Intercept) 34.374 0.837 32.753 34.367 36.026
> stata.data$wcoord -0.198 0.129 -0.452 -0.197 0.050
> stata.data$labmgmt 1.809 0.584 0.656 1.809 2.950
> stata.data$tnchs -5.468 0.677 -6.801 -5.467 -4.125
> stata.data$tnclc -0.911 0.932 -2.732 -0.908 0.912
> stata.data$govtints -0.129 0.452 -1.021 -0.134 0.754
> stata.data$wagecoor -0.223 0.403 -1.013 -0.226 0.578
> stata.data$sstran -0.127 0.039 -0.204 -0.127 -0.050
> stata.data$netu 0.000 0.000 0.000 0.000 0.000
> stata.data$cg -0.035 0.019 -0.073 -0.035 0.003
> stata.data$openk 0.056 0.007 0.042 0.056 0.069
> stata.data$capital 0.481 0.212 0.067 0.484 0.891
> stata.data$egrowth 0.049 0.032 -0.014 0.049 0.110
> sigma2 2.692 0.233 2.276 2.680 3.192
>