In R, we below code for weighted GLM:
glm(formula, weight)
R Documentation: an optional vector of ‘prior weights’ to be used in the fitting process. Should be NULL or a numeric vector
In Python, using statsmodel.formula.api:
smf.glm(formula, data, freq_weight)
Python Documentation: 1d array of frequency weights. The default is None. If None is selected or a blank value, then the algorithm will replace with an array of 1’s with length equal to the endog.
Is the "weight" in R same as "freq_weight" in Python? (I am getting different Beta estimates in Python and R. They are close but slightly different)