The difference between svyglm and weighted glm

I would like to know what is the difference between using svyglm or weighted glm .

For instance:

 M1 = glm(formula = yy ~ age + gender + country , family = binomial(link = "probit"), data = P2013, subset = (P2013$E27>=14 & P2013$E27<=17), weights = P2013$PESOANO) 

or define a design sample as:

 diseño = svydesign(id =~ NUMERO, strata =~ ESTRATOGEO, data = p2013, weights = P2013$PESOANO) diseño_per_1417 = subset(diseño, (P2013$E27>=14 & P2013$E27<=17)) 

and then use svyglm :

 M2 = svyglm(formula = yy ~ age + gender + country, family = quasibinomial(link = "probit"), data = P2013, subset = (stratum=!0), design = diseño_per_1417) 

In the case of using M2 ( svyglm ). What can I use to compare models like stepwise for glm model?

Thank you Natalya

+4
source share
1 answer

From help(glm) :

Non-NULL weights can be used to indicate that different observations have different variances (the values ​​in the weights are inversely proportional to the variances); or equivalently, when the elements of the weights are positive integers w_i, each answer y_i is the average of w_i measurements of a unit weight. For binomial GLM, scales were previously used to give a number of tests when the answer is a fraction of the success: they were rarely used for Poisson GLM.

I do not think you are looking for these weights. From your example, it seems that you are dealing with a stratified survey. you should definitely use surveyglm .

+2
source

All Articles