Dear Customer,
Your parcel has arrived at November 28. Courier was unable to deliver the parcel to you.
Shipment Label is attached to email.
Yours trully,
Fernando Mcpherson,
Sr. Delivery Manager.
Hi,
This is my first posting and I apologise if similar questions have
been asked before.
I have run these R codes (codes mostly taken from Matt Bogart blog).
My question would be:
1) (see the lowermost of the codes) Which model specification is the
'best' the describe the adjusted/matched predictive effect of 'treat'
upon 're78'?
2) What is the difference between the linear combination of 'treat +
pscore' against 'treat +
age+educ+black+hispan+married+nodegree+re74+re75' when both are using
the matched data generated by 'match.data'
###################################
library(MatchIt)
data1<-lalonde
#matching
m.out1<-matchit(treat~age+educ+black+hispan+nodegree+married+
re74+re75,data=data1,method = 'nearest',
distance = 'logit')
# create matched data based on matchit, giving the output ps as pscore
m.data1<-match.data(m.out1,distance='pscore')
# generate propensity score manually
m.data2<-lalonde
head(m.data2)
ps.mod<-glm(treat~age+educ+black+hispan+married+
nodegree+re74+re75,data=m.data2,family = binomial(link='logit'))
summary(ps.mod)
#predict for prosp score
head(m.data2)
m.data2$psore<-fitted(ps.mod)
head(m.data2)
dim(m.data2)
#do models
mod.reg<-lm(re78~treat+age+educ+black+hispan+married+nodegree+re74+re75,data
= lalonde)
mod.ps1<-lm(re78~treat+age+educ+black+hispan+married+nodegree+re74+re75,data
= m.data1)
mod.ps11<-lm(re78~treat+pscore,data = m.data1)
mod.ps2<-lm(re78~treat+age+educ+black+hispan+married+nodegree+re74+re75,data
= m.data2)
#restrict to ps between 0.1 to 0.9
m.data3<-m.data2[m.data2$psore>=0.1 & m.data2$psore<=.9,]
mod.ps3<-lm(re78~treat+age+educ+black+hispan+married+nodegree+re74+re75,data
= m.data3)
summary(mod.reg);summary(mod.ps1);summary(mod.ps11);summary(mod.ps2);summary(mod.ps3)
#####################
Thank you
Kamarul
--
Dr. Kamarul Imran Musa,
M.D. M.Community.Med.
Associate Professor (Epidemiology and Biostatistics) &
Public Health Physician
Dept of Community Medicine
School of Medical Sciences
16150 Universiti Sains Malaysia, Kbg Kerian
Kelantan
Thomson Reuters researchID: http://www.researcherid.com/rid/G-4864-2010
Google-scholar:
http://scholar.google.co.uk/citations?user=aZyayMgAAAAJ&hl=en&authuser=1
blog: http://designdataanalysis.wordpress.com
email : drkamarul(a)usm.my , k.musa(a)lancaster.ac.uk