Skip to main content
added 174 characters in body
Source Link
gung - Reinstate Monica
  • 147.5k
  • 89
  • 406
  • 717

(I'll let someone else address the estimation of the missing data. You may want to directly model the probability that the observation is each level of the unknown factor directly using knowledge of other covariate values, and possibly outside information, e.g., priors etc. There are strategies such as propensity scores that you might be able to use for this type of thing. However, at first glance your approach looks reasonable to me.)

One note is that I can't tell from your description if you are weighting by raw frequencies. If so, you want to divide these by $N$ to get the marginal probabilities instead.

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0\!*\!f_3 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 $$ Note that you are multiplying the intercept (which encodes the reference level) by the marginal probability that the observation is actually the reference level.

(I'll let someone else address the estimation of the missing data. You may want to model the probability that the observation is each level of the unknown factor directly using knowledge of other covariate values, and possibly outside information, e.g., priors etc. However, at first glance your approach looks reasonable to me.)

One note is that I can't tell from your description if you are weighting by raw frequencies. If so, you want to divide these by $N$ to get the marginal probabilities instead.

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0\!*\!f_3 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 $$ Note that you are multiplying the intercept (which encodes the reference level) by the marginal probability that the observation is actually the reference level.

(I'll let someone else address the estimation of the missing data. You may want to directly model the probability that the observation is each level of the unknown factor using knowledge of other covariate values, and possibly outside information, e.g., priors etc. There are strategies such as propensity scores that you might be able to use for this type of thing. However, at first glance your approach looks reasonable to me.)

One note is that I can't tell from your description if you are weighting by raw frequencies. If so, you want to divide these by $N$ to get the marginal probabilities instead.

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0\!*\!f_3 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 $$ Note that you are multiplying the intercept (which encodes the reference level) by the marginal probability that the observation is actually the reference level.

added 295 characters in body
Source Link
gung - Reinstate Monica
  • 147.5k
  • 89
  • 406
  • 717

(I'll let someone else address the estimation of the missing data. (At You may want to model the probability that the observation is each level of the unknown factor directly using knowledge of other covariate values, and possibly outside information, e.g., priors etc. However, at first glance, it your approach looks reasonable to me.)

One note is that I can't tell from your description if you are weighting by raw frequencies. If so, you want to divide these by $N$ to get the marginal probabilities instead.

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 + 0\!*\!f_3 $$$$ \beta_0\!*\!f_3 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 $$ Note that you don't have to do it this way. You can suppressare multiplying the intercept and use a dummy for each(which encodes the reference level of your factor. Some people prefer this because they think it is conceptually clearer. However, it is exactly) by the same as above, just withmarginal probability that the labels shiftedobservation is actually the reference level.

I'll let someone else address the estimation of the missing data. (At first glance, it looks reasonable to me.)

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 + 0\!*\!f_3 $$ Note that you don't have to do it this way. You can suppress the intercept and use a dummy for each level of your factor. Some people prefer this because they think it is conceptually clearer. However, it is exactly the same as above, just with the labels shifted.

(I'll let someone else address the estimation of the missing data. You may want to model the probability that the observation is each level of the unknown factor directly using knowledge of other covariate values, and possibly outside information, e.g., priors etc. However, at first glance your approach looks reasonable to me.)

One note is that I can't tell from your description if you are weighting by raw frequencies. If so, you want to divide these by $N$ to get the marginal probabilities instead.

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0\!*\!f_3 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 $$ Note that you are multiplying the intercept (which encodes the reference level) by the marginal probability that the observation is actually the reference level.

Source Link
gung - Reinstate Monica
  • 147.5k
  • 89
  • 406
  • 717

I'll let someone else address the estimation of the missing data. (At first glance, it looks reasonable to me.)

You are right that you are not handling level 3 correctly. The coding scheme that you use in your question set up is known as reference level coding. To use this approach correctly, you need to have an intercept (i.e., $\beta_0$), which estimates the mean of level 3. I suspect you do have such, even though you didn't list it. In this case, you would just add the intercept to your final equation. That is: $$ \beta_0 + \beta_1\!*\!f_1 + \beta_2\!*\!f_2 + 0\!*\!f_3 $$ Note that you don't have to do it this way. You can suppress the intercept and use a dummy for each level of your factor. Some people prefer this because they think it is conceptually clearer. However, it is exactly the same as above, just with the labels shifted.