is it okay to divide each individual's value of a variable by the mean of the sample and then use this transformed variable for a regression in a sample?
For example:
Code:
sysuse auto, clear
. reg price trunk weight displacement gear_ratio
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(4, 69) = 8.54
Model | 210211246 4 52552811.6 Prob > F = 0.0000
Residual | 424854150 69 6157306.52 R-squared = 0.3310
-------------+---------------------------------- Adj R-squared = 0.2922
Total | 635065396 73 8699525.97 Root MSE = 2481.4
------------------------------------------------------------------------------
price | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
trunk | -63.64507 91.74253 -0.69 0.490 -246.6664 119.3763
weight | 2.160798 .8998892 2.40 0.019 .3655685 3.956028
displacement | 10.36613 8.266774 1.25 0.214 -6.125634 26.85789
gear_ratio | 2192.778 1140.727 1.92 0.059 -82.91105 4468.466
_cons | -8139.774 4688.715 -1.74 0.087 -17493.5 1213.956
egen meanprice = mean(price)
gen dividedprice = price/meanprice
. reg dividedprice trunk weight displacement gear_ratio
Source | SS df MS Number of obs = 74
-------------+---------------------------------- F(4, 69) = 8.54
Model | 5.53036265 4 1.38259066 Prob > F = 0.0000
Residual | 11.177316 69 .161990087 R-squared = 0.3310
-------------+---------------------------------- Adj R-squared = 0.2922
Total | 16.7076786 73 .22887231 Root MSE = .40248
------------------------------------------------------------------------------
dividedprice | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
trunk | -.0103232 .0148806 -0.69 0.490 -.0400091 .0193627
weight | .0003505 .000146 2.40 0.019 .0000593 .0006417
displacement | .0016814 .0013409 1.25 0.214 -.0009936 .0043563
gear_ratio | .3556669 .1850251 1.92 0.059 -.0134481 .7247819
_cons | -1.320265 .760506 -1.74 0.087 -2.837433 .1969028
------------------------------------------------------------------------------
The motivation would be to see what factors effect the price to lie above the sample average.
Thank you!
0 Response to Is it possible to divide a variable by the mean across individuals for a regression???
Post a Comment