POLMETH Archives

Political Methodology Society

POLMETH@LISTSERV.WUSTL.EDU

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stacey Pelika <[log in to unmask]>
Reply To:
Political Methodology Society <[log in to unmask]>
Date:
Sat, 17 Jun 2006 21:30:51 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
Hi everyone,

I'm trying to do something that would seem relatively simple but is
turning out to be quite the challenge. Basically, I need to generate a
weighted correlation matrix using imputed data. I've imputed the data (a
challenge in itself), but it looks Clarify doesn't accept weights, and
Zelig wants me to specify a model (OLS, logit, etc.) rather than using
cov.wt, which I've been using to generate a weighted correlation matrix
for individual datasets (cov.wt has the added issue of requiring the
specification of a data frame rather than a pair of variables, so I
can't use it in a cross-data-frame expression).

The one way I've figured out to do this is by using the mitools package
in R (this would also work with Zelig, I'm assuming). Basically, I run a
standardized bivariate regression using weights for each pair of
variables and then use MIcombine to combine the results across datasets,
like this:

library(mitools)
files.zdata<-list.files(pattern="[z]",full=T)
il.zdata<-imputationList(lapply(files.zdata,read.table))
lm.trial<-with(il.zdata,lm(scale(V25)~scale(V26)-1,weight=V2))
summary(MIcombine(lm.trial))

However, this is a bit unwieldy as I have to run a separate regression
for each pair of variables, extract the beta from each, and build a
matrix from the results. I'm wondering if anyone out there has any idea
how to do this more quickly and easily? I'm happy to use R or Stata...

Thanks!
Stacey
--
Stacey Pelika
Doctoral Candidate
Department of Political Science
University of Wisconsin - Madison
110 North Hall, 1050 Bascom Mall
Madison, WI 53706

"Words can only hurt if you try to read them. Don't play their game."
-Derek Zoolander

**********************************************************
             Political Methodology E-Mail List
        Editor: Karen Long Jusko <[log in to unmask]>
**********************************************************
        Send messages to [log in to unmask]
  To join the list, cancel your subscription, or modify
           your subscription settings visit:

          http://polmeth.wustl.edu/polmeth.php

********************************************************** 

ATOM RSS1 RSS2