For CEM, you don't need match.data; you just use the original data set with
CEM weights (these weight observations that were not matched at zero, and
other observations are weighted appropriately). so for example something
like this ought to work:
matt4 <- cem(treatment="t4", drop=c("numcode", "group",
"ccode", "country",
"region", "rcode", "year"),
datalist=datprep, data=data)
modt4.1 <- zelig(prot ~ lgpop + gpro + poldis + gorg + repact + polity2 +
secfil + toolfil + lgdp + lgdppc, model=ls,
data=data, weights = matt4$w)
Gary
--
*Gary King* - Albert J. Weatherhead III University Professor - Director,
IQSS - Harvard University
GKing.Harvard.edu <http://gking.harvard.edu/> - King(a)Harvard.edu -
@kinggary<http://twitter.com/kinggary>- 617-500-7570 - Asst 495-9271 -
Fax 812-8581
On Sat, Jan 29, 2011 at 8:43 PM, Evann Smith <egsmith(a)fas.harvard.edu>wrote;wrote:
I've created a matched mulitply imputed dataset
(created in Amelia) via
cem, using the option "datalist." Now that I've done so, I'm trying
to
figure out how to apply the match.data() command in MatchIt, so that I may
analyze the data in Zelig. MatchIt does not seem to want to process the
output object from cem, and yet I can't find a command in cem similar to
match.data(). What's the best way to proceed?
matt4 <- cem(treatment="t4",
drop=c("numcode", "group", "ccode",
"country", "region", "rcode", "year"),
datalist=datprep, data=data)
class(matt4)
[1]
"cem.match.list" "list"
t4data <- match.data(matt4)
class(t4data)
[1] "NULL"
t4data
NULL
modt4.1 <- zelig(prot ~ lgpop + gpro + poldis
+ gorg + repact + polity2 +
secfil + toolfil + lgdp + lgdppc, model=ls,
data=t4data)
Error in paste("zelig2", model, sep = "") :
cannot coerce type 'closure' to vector of type 'character'
====================================
Evann Smith
Ph.D. Candidate
Harvard University, Department of Government
egsmith(a)fas.harvard.edu
====================================
--
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)lists.gking.harvard.edu
Subscribe/Unsubscribe:
http://lists.gking.harvard.edu/?info=matchit
MatchIt Software and Documentation:
http://gking.harvard.edu/matchit/
Browse/Search List Archive:
http://lists.hmdc.harvard.edu/lists/matchit/