I have a regression with typical Stata output. The only independent variable is a dummy (=1 if person bought certain item). How can I find how many people in the sample bought the item?
Tell me more
×
Cross Validated is a question and answer site for
statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.
|
|
Suppose your fitted regression model is the following: $\hat{y}=b_0+b_1x$. The fitted line goes through the point $(\bar{x},\bar{y})$. If you know $\bar{y}$, then $\bar{x}=\frac{\bar{y}-b_0}{b_1}$. $\bar{x}$ is the proportion of the sample that purchased the item. Multiplying $\bar{x}$ by the sample size gives the number of people in the sample that purchased the item. |
|||
|
|