On 2012-07-15 14:37, shyam basnet wrote:> Dear R-Users,
>
> I have a problem on extracting T-Stat and P-Value. I have written R-code
below
>
> library("Matching")
>
> data("lalonde")
> attach(lalonde)
> names(lalonde)
> Y<- lalonde$re78
>
> Tr<- lalonde$treat
> glm1<-
glm(Tr~age+educ+black+hisp+married+nodegr+re74+re75,family=binomial,data=lalonde)
>
> pscore.predicted<- predict(glm1)
>
> rr1<- Match(Y=Y,Tr=Tr,X=glm1$fitted,estimand="ATT",
M=1,ties=TRUE,replace=TRUE)
>
> summary(rr1)
>
>> summary(rr1)
>
> Estimate... 2624.3
> AI SE...... 802.19
> T-stat..... 3.2714
> p.val...... 0.0010702
>
> Original number of observations.............. 445
> Original number of treated obs............... 185
> Matched number of observations............... 185
> Matched number of observations (unweighted). 344
>
> In above output, I can extract "Estimate" and "AI SE"
with below code:
> rr1$est
>
> rr1$se
>
> But the problem is I could not extract T-statistic and P-value from the
above output.
>
>
> Could you please someone help me to resolve this problem?
You could look at the code for summary.Match to see that
T-stat (not surprisingly) is calculated as est/se and
p.val is calculated as (1 - pnorm(abs(est/se))) * 2.
summary.Match() doesn't return these values, it just
prints them.
Peter Ehlers
> Thanking you,
>
> Best Regards,
>
> Shyam Basnet
> SLU, Uppsala, Sweden
>
> [[alternative HTML version deleted]]