I am currently working with a matching task in which I need to establish
balance within funder's guidelines (SD <= .25). At this point, I am
running matchIT (Syntax provided below) and then saving the matching
solution as a CSV file and using Excel to compute the SD's for each of the
covariates.
However, I see in the Matchit documentation that the sum.all may accomplish
this within the program in one step.
My problem is that I cannot figure out how to include the sum.all command.
Thanks in advance for any help,
Bill
*MI_mah_ctakPCT_11_20.out <- matchit(tx ~ CtakPCT +dropout + race + pov +
Mathprfc + Readprfc +ACTComZ + size , data = MI11, method = "optimal",
ratio=4,Distance ="Mahalanobis")*
*MI_mah_ctakPCT_11_20.out*
*MI_mah_ctakPCT_11_20.dat <- match.data(MI_mah_ctakPCT_11_20.out)*
*MI_mah_ctakPCT_11_20.dat*
*summary(MI_mah_ctakPCT_11_20.dat)*
*write.table(MI_mah_ctakPCT_11_20.dat,"C:/SECEP/match/MI match
output/MI_mah_ctakPCT_11_20.txt",sep="\t",row.names=FALSE)*
--
William N. Dudley, PhD
Professor - Public Health Education
The School of Health and Human Sciences
The University of North Carolina at Greensboro
437-L Coleman Building
Greensboro, NC 27402-6170
Visit my Web Site <http://www.uncg.edu/phe/faculty/dudley.html>
VOICE 336.256 2475
Hi,
Suppose my data looks something like this:
library(tidyverse)
set.seed(112116)
df <- data.frame(treatment=sample(x = c(0,1), size = 100, replace = T),
x1 = rnorm(n = 100, mean = 0, sd = 1),
x2 = runif(n = 100, -10, 10)) %>%
mutate(x3 = x1+x2,
y = 0.5*treatment + 2*x1 + 3*x2 + rnorm(100,0,1))
If I run:
lm(y~treatment+x1+x2+x3, data=df)
`lm` will automatically drop `x3` because of multicoliniarity. I assume
matchit is doing something similar. Is there a way of seeing which variable
is drooped?
m1 <- MatchIt::matchit(formula = treatment~x1+x2+x3, data = df, method =
"nearest")
summary(m1)
Thanks,
Ignacio