?????Hi Soko,
Could you provide a replicable example of this, say with the lalonde data? It's hard
to guess at what might be going on without some dataset.
Dan
----- Original Message -----
From: S Setoguchi
To: 'Daniel E. Ho'
Sent: Wednesday, May 18, 2005 12:23 AM
Subject: Proepensity score matching using nnet
Hi Dan
Would like your help for one more thing.
I cannot figure out what is going on my program and you might have an insight.
I created the dataset called W and doing propensity score matching using nnet.W is the
data with 12 varibales named w1 through w10, a, and y.
I get the following error message. Do you have any idea what is going on?
Soko
is.data.frame(W)
[1] TRUE
psmatch<-
matchit(a~w1+w2+w3+w4+w5+w6+w7+w8+w9+w10,model="nnet",data=W,size=5)
Calculating propensity score...# weights: 37
initial value 502.266699
iter 10 value 393.923293
iter 20 value 390.399478
iter 30 value 387.433295
iter 40 value 384.763135
iter 50 value 383.245161
iter 60 value 382.258124
iter 70 value 381.175506
iter 80 value 380.259462
iter 90 value 379.869123
iter 100 value 378.775436
final value 378.775436
stopped after 100 iterations
Error: Data W must be a dataframe
traceback()
8: stop("Data ",
cl$data, " must be a dataframe", call. = FALSE)
7: matchit(a ~ w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + w9 + w10,
model = "nnet", data = W, size = 10, caliper = 0.1)
6: summary.nnet(res)
5: summary(res)
4: distance(formula = a ~ w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 +
w9 + w10, model = "nnet", data = W, size = 5)
3: eval(expr, envir, enclos)
2: eval(as.call(mf), sys.frame(sys.parent()))
1: matchit(a ~ w1 + w2 + w3 + w4 + w5 + w6 + w7 + w8 + w9 + w10,
model = "nnet", data = W, size = 5)