Hi! This is my first time using the WeightIt package, so I hope this question makes sense. I'm using two different samples for the analysis that we're doing. Sample 1 is a larger sample from which we're estimating the propensity score model, and Sample 2 is a smaller sample, where we're using propensity score weights estimated with the model fit on Sample 1 to estimate our model in Sample 2 (ATE). We have a secondary outcome that is dichotomous, so I wanted to use a logistic regression model . For the primary outcome (which is continuous) I had calculated the weights without the WeightIt package and used lm() with weights, but when I started to look at the dichotomous outcome and tried to use glm() with the weights argument, but got an error that made it clear that the weights in glm are not sampling weights.
I looked into the WeightIt package which seems great, however it seems like the only way to enter in weights is by generating a weightit object using the weightit function. But given that the weightit function is calculating weights for Sample 1 and the model I want to fit is for Sample 2, I don't really think this is going to work. Is there someway I can feed in the weights I've calculated directly into the glm_weightit() function? I understand this may be less than ideal because it will not account for the covariance structure, but this seems like my only option.
If you have any other suggestions I would be very open to it!
Hi! This is my first time using the WeightIt package, so I hope this question makes sense. I'm using two different samples for the analysis that we're doing. Sample 1 is a larger sample from which we're estimating the propensity score model, and Sample 2 is a smaller sample, where we're using propensity score weights estimated with the model fit on Sample 1 to estimate our model in Sample 2 (ATE). We have a secondary outcome that is dichotomous, so I wanted to use a logistic regression model . For the primary outcome (which is continuous) I had calculated the weights without the WeightIt package and used lm() with weights, but when I started to look at the dichotomous outcome and tried to use glm() with the weights argument, but got an error that made it clear that the weights in glm are not sampling weights.
I looked into the WeightIt package which seems great, however it seems like the only way to enter in weights is by generating a weightit object using the weightit function. But given that the weightit function is calculating weights for Sample 1 and the model I want to fit is for Sample 2, I don't really think this is going to work. Is there someway I can feed in the weights I've calculated directly into the glm_weightit() function? I understand this may be less than ideal because it will not account for the covariance structure, but this seems like my only option.
If you have any other suggestions I would be very open to it!