Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • allocating new observations between two samples based on R2 change

    I have two variables Y and X, and two groups of observations (samples A and B, with n observations each). For each sample, I estimated a linear OLS regression of the form Y=f(X), with the particularity that the estimated f in sample A is different than that for sample B. This is, the estimated parameters relating X and Y are different across samples.

    The problem: I get one additional observation, and I want to know where this observation 'fits' better; this is: to which sample (A or B) should I allocate this observation to. I want to use a goodness-of-fit criteria (R2) to 'place' this additional observation either in sample A or in sample B. The new observation will be 'placed' in that sample where it implies a better change in the goodness of fit (R2)

    I could perform this simple exercise 'manually'; but I have many new observations arriving, and I am looking for a Stata procedure that could perform the task of allocating the new observations among the two samples based on their marginal contribution to the goodness-of-fit criterion, so that I end up with all arriving observations being placed either in group A or group B based on their contribution to goodness-of-fit criterion.

    I wonder if there is a Stata procedure to allocate new observations across groups based on R2 contribution.

    I appreciate your help.

    Mariano Rojas
Working...
X