Weighted glm r