I have a problem of how to decide the weight of the logistic regression. My model is as below.

For the general logistic regression, we have the likelihood of the model: $L(\theta)=\prod_{i=1}^{m}P ( Y_i=j|\beta_0,\beta_1 )$

$=\prod_{i=1}^{m}(\frac{e^{\beta_0+\beta_ 1x_i}}{ 1+e^{\beta_0+\beta_1x_i}})^{y_i}(\frac{ 1}{ 1+e^{\beta_0+\beta_1x_i}})^{ 1-y_i}$

$=\prod_{i=1}^{m}(e^{\beta_0+\beta_ 1x_i})^{y_i}\frac{1 }{ 1+e^{\beta_0+\beta_1 x_i}}$

The log likelihood of the equation is

$l(\theta)=\sum_{i=1 }^{m}(y_i(\beta_0+\beta_1x_i)-log( 1+e^{\beta_0+\beta_1 x_i}))$

Here, we add the weight $w_{\lambda}(i,m)$, than the locally likelihood of the equation is:

$l(\theta)=\sum_{i=1 }^{m}(y_i(\beta_0(i)+\beta_1(i)x_i)-log( 1+e^{\beta_0(i)+\beta_1(i) x_i}))w_{\lambda}(i,m)$

Here if $w_{\lambda}(i,m)={\lambda}^{m-i}$, How to decide $\lambda$;

if $w_{\lambda}(i,m)={\lambda}^{(m-i)/(2r^2)}$, How to decide $\lambda$ and $r$

I would also like to estimate $\beta_0$ and $\beta_1$.

Are there any packages to make this decision? I try to use glm to do this. Though I can not figure what the 'weights' really mean in glm. Thus I can not make sure whether I can do it this way. The code is as below:

model <- glm(y~x,family = quasibinomial('logit'),data=df,weights=w)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.