Displaying 4 results from an estimated 4 matches for "nodegree".
Did you mean:
degree
2010 Dec 21
0
"variable lengths differ (found for '(weights)')" error in Zelig library
...during the matching
procedure as some
control units may be dropped.)"
The following code is for the "lalonde" data set, where I get an error
message in the end:
> library(Zelig)
> library(MatchIt)
> data(lalonde)
> m.out1 = matchit(treat ~ age + educ + black + hispan + nodegree + married
+ re74 + re75, method = "subclass", subclass=6, data = lalonde)
> z.out1 = zelig(re78 ~ age + educ + black + hispan + nodegree + married +
re74 + re75, data = match.data(m.out1, "control"), model = "ls",
weights="weights")
> x.out1 = setx(z.ou...
2011 Jun 26
2
how to extract data from a function printout - example provided
...file (while the function itself shouldn't be changed), so that further analysis on each data set could be carried out. Your help is deeply appreciated. Have a good day. Ana
Here is the code:
library(MatchIt)
f <- treat ~ age + I(age^2) + educ + I(educ^2) + black + hispan +
married + nodegree + re74 + I(re74^2) + re75 + I(re75^2)
d <- lalonde
m <- "nearest"
matching <- function(formula,data,method){
library(MatchIt)
m.out <- matchit(formula=f, data=d, method=m)
print(m.out)
print(summary(m.out))
}
matching(f,d,m)
[[alte...
2011 Jan 25
0
Problem with matchit() and zelig()
Dear all,
Does anybody know why the following code returns an error message?
>library(MatchIt)
>library(Zelig)
>data(lalonde)
>
>m.out1<-matchit(treat~age+educ+black+hispan+nodegree+married
+re74+re75, method="full", data=lalonde)
>
>z.out1<-zelig(re78~age+educ+black+hispan+nodegree+married+re74+re75,
data=match.data(m.out1, "control"), model="ls" , weights="weights" )
>
>x.out1<-setx(z.out1, data=match.data(m.out1, &qu...
2011 Jul 06
0
matching, treatment effect-ATT and Zelig package
...tuation (code below) actually does. Is this considered as a so called regression adjustment after the propensity score matching?
library(MatchIt)
library(Zelig)
data(lalonde)
re78 represents the outcome variable
1. With Zelig
m.out <- matchit(treat ~ age + educ + black + hispan + married + nodegree + re74 + re75, data = lalonde)
z.out <- zelig(re78 ~ distance, data = match.data(m.out, "control"), model = "ls")
x.out <- setx(z.out, fn = NULL, data = match.data(m.out, "treat"), cond = TRUE)
s.out <- sim(z.out, x = x.out)
summary(s.out)
2. Without Zelig -...