Dear matchits:
This is in reference to
http://lists.gking.harvard.edu/lists/matchit_at_lists_gking_harvard_edu/2008
_11/msg00000.html
I too was having problems using matchit and match.data from within a
function. I solved the problems using the same hack as in the prior posting
referenced above. This appears to be a variable scoping error. It's a
guess on my part, but it looks like you are referencing the root scope (0)
instead of the current scope - 1.
I hope this helps.
-- Tom
--
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/
Dear matchits:
This is a follow-up to my prior message.
I managed to find the "restrict" parameter in the documentation for the
genetic matching method ( help(GenMatch), see below). I have set up the
exclusion matrix as described in the documentation, but it does not appear
to make a difference (I'm still getting treatment/control pairs from the
same country).
Has anyone used this feature of genetic matching successfully?
Cheers,
Tom
Restrict:
A matrix which restricts the possible matches. This matrix has one row for
each restriction and three columns. The first two columns contain the two
observation numbers which are to be restricted (for example 4 and 20), and
the third column is the restriction imposed on the observation-pair.
Negative numbers in the third column imply that the two observations cannot
be matched under any circumstances, and positive numbers are passed on as
the distance between the two observations for the matching algorithm. The
most commonly used positive restriction is 0 which implies that the two
observations will always be matched.
Exclusion restriction are even more common. For example, if we want to
exclude the observation pair 4 and 20 and the pair 6 and 55 from being
matched, the restrict matrix would be: restrict=rbind(c(4,20,-1),c(6,55,-1))
--
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/
Dear matchits:
I find my self performing an anlaysis where I want to prevent matchit from
making certain treatment/control pairings.
More specifically, I'm analyzing a cross-national time series dataset and I
do not want to pair a country with itself (for example, USA-1988 and
USA-1990 should not be allowed to be controls for USA-1989).
The easy solution is to force extact matching by year. But it turns out that
this is too restrictive for my data (yields too many unmatched treatment
cases). It seems like there should be an easy way to do this, but I can't
quite figure it out.
Much gratitude in advance for any assistance any of you may be able to
provide.
Cheers,
Tom
--
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/