hmm... interesting. maybe, the data set hasn't been loaded properly?
Kosuke
--
Department of Politics
Princeton University
On Tue, 7 Apr 2009, Lugtig, P. (Peter) wrote:
Dear colleagues,
I encountered a problem in using matchit; more particular in the
combination of matching using propensity scores including a caliper
score based on the mahalanobis distance. Below you find a fragment of my
R-output:
Problem:
panel <- read.table("G:/data 25-03-09 na
norm alleen catiwapi.dat",
header=T, quote="", dec=".")
dim(panel)
[1] 4032 19
tevredenm.out.cal <- matchit(catiwapi~
inkomen+stedelijk+V66+V63+V61+job+livalone
+ +zorgen+V44+V61*V63+V61*livalone+V66*job+
+ V61*job+V63*V61,data=panel,distance="mahalanobis",
+ mahvars = c("V61", "V66", "zorgen"),
caliper=0.0005)
Error: subscript out of bounds
I found this error, despite many efforts to solve it. Apparantly, R
cannot extract the individual variables from the data matrix (despite
the fact I atta
In the end I found one workaround which didn't produce the error, but I
have no clue why this is. Did anyone else encounter this particular
error?
Solved by:
panels <- read.table("G:/data 25-03-09
na norm alleen catiwapi.dat",
header=T, quote="",
dec=".")
> panel <- panels[1:4032,1:19]
tevredenm.out.cal <- matchit(catiwapi~
inkomen+stedelijk+V66+V63+V61+job+livalone
+ +zorgen+V44+V61*V63+V61*livalone+V66*job+
+ V61*job+V63*V61,data=panel,distance="mahalanobis",
+ mahvars = c("V61", "V66", "zorgen"),
caliper=0.0005)
works as I want it
warm greeting from the Netherlands,
Peter Lugtig
Methoden en technieken/ methods and statistics
Utrecht University
--
MatchIt mailing list served by Harvard-MIT Data Center
List Address: matchit(a)lists.gking.harvard.edu
Subscribe/Unsubscribe: