Vorrei sapere come il trattamento dei pesi differisce tra svyglmeglm
Sto usando il twangpacchetto in R per creare punteggi di propensione che vengono quindi utilizzati come pesi, come segue (questo codice proviene dalla twangdocumentazione):
library(twang)
library(survey)
set.seed(1)
data(lalonde)
ps.lalonde <- ps(treat ~ age + educ + black + hispan + nodegree + married + re74 + re75,
data = lalonde)
lalonde$w <- get.weights(ps.lalonde, stop.method="es.mean")
design.ps <- svydesign(ids=~1, weights=~w, data=lalonde)
glm1 <- svyglm(re78 ~ treat, design=design.ps)
summary(glm1)
...
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6685.2 374.4 17.853 <2e-16 ***
treat -432.4 753.0 -0.574 0.566
Confronta questo con:
glm11 <- glm(re78 ~ treat, weights=w , data=lalonde)
summary(glm11)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6685.2 362.5 18.441 <2e-16 ***
treat -432.4 586.1 -0.738 0.461
Quindi le stime dei parametri sono le stesse ma gli errori standard per il trattamento sono abbastanza diversi.
In che modo il trattamento dei pesi differisce tra svyglme glm?
surveyglm)?