2
$\begingroup$

I am thinking about this question in using a dummy variable, from the textbook we know dummy play as a "switch" to represent different groups regression models. However, in data analysis, if I have a two-level factor explanatory variable and I am particularly interested in one level, given the dataset can I just shrink the dataset to focus on that particular level.

I've played around with the data and realised whether using a dummy variable or not, obtained the same parameter estimation, but without a dummy, I could have a smaller standard error for the estimated parameter for that specific level.

I am just wondering is there any drawback of this procedure in data analysis, is it ok to shrink the dataset?

I was not able to post those data to discuss until I had submitted the assignment, now we can discuss a bit further.

enter image description here

Here is the regression of $sqft$ on $price$, the upper left model is only regressed on traditional-style data, bottom left is the regression with indicator variable on the whole data set(traditional+nontraditional), and the right one is the model where traditional takes value $1$, we just compare the upper left and right, we could see the estimate is the same, but left model with lower $SE$ so that I prefer to use the left model when all questions are asking about traditional style, is that appropriate to shrink the data using the left model as I did. If not, why not?

$\endgroup$
8
  • 1
    $\begingroup$ Can you be more concrete about what you’re doing? Right now, it sounds like you have a day set of dogs and cats but only care about the dogs, so you want to exclude the cats. Is that about right? $\endgroup$
    – Dave
    Commented Oct 23, 2021 at 5:56
  • $\begingroup$ @Dave Thank you for your reply. Yes. I am analyzing the wage data which has male and female two categories, and I am about to run regression and construct confidence interval and some hypothesis test about this data set. Firstly I think about using a dummy variable on the whole dataset, then I soonly realised all of questions just asking about the female category, then I think I could just play with female data without the dummy variable. $\endgroup$
    – LJNG
    Commented Oct 23, 2021 at 7:04
  • $\begingroup$ @Dave This makes me think about why we need the dummy at all, we could separately to run regression over these two sets and then compare. Is there any drawback to this technique? $\endgroup$
    – LJNG
    Commented Oct 23, 2021 at 7:04
  • $\begingroup$ Could you explain why you expect to have a smaller standard error for the estimated parameter? In simple cases , I would expect the opposite. If there are parameters "shared" by the factors, than these should have a better estimate in the full sample simply due to having more samples to estimate it. For instance, if your regression formula was something like $\mbox{wage} \sim \mbox{sex} + \mbox{education}$, then I would expect that the regression parameter associated with education had smaller a standard deviation in the full sample. Maybe we need to see what you are trying to accomplish. $\endgroup$ Commented Oct 23, 2021 at 9:21
  • $\begingroup$ @LucasPrates Yes,you are right for the regression for the main regression model, which includes the indicator variable. However, when we split the main model into two-level, each representing a different group (.e.g male, female), the indicator takes values 1 would change the intercept or slope or both, when they combine, the SE from indicator need to integrate with SE of original slope and intercept, and this inflate the SE for slope or intercept. However, run over smaller dataset directly without indicator variable, which has smaller SE on estimate parameter. $\endgroup$
    – LJNG
    Commented Oct 23, 2021 at 12:52

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.