Dear Statalist
When I want to look at some partial or semipartial results I use the pcorr command:
. sysuse auto
. pcorr price mpg weight foreign
(obs=74)
Partial and semipartial correlations of price with
Partial Semipartial Partial Semipartial Significance
Variable | Corr. Corr. Corr.^2 Corr.^2 Value
------------+-----------------------------------------------------------------
mpg | 0.0352 0.0249 0.0012 0.0006 0.7693
weight | 0.5488 0.4644 0.3012 0.2157 0.0000
foreign | 0.5402 0.4541 0.2918 0.2062 0.0000
It is however not possible to do when having categorical variables.
e.g if I wanted to incorporate age as an category i.age
Is there a way to get partial and semipartial correlation when having categorical variables. (or to adjust for the effect of them).
The regress command give the overall R-squared value for the entire model but not for the individual variables.
Is there a way to get this with the pcorr or doing further analysis after the regress command?
Using Stata 13.1 on a windows 7-64bit pc
Kind Regards
Dennis Nielsen
When I want to look at some partial or semipartial results I use the pcorr command:
. sysuse auto
. pcorr price mpg weight foreign
(obs=74)
Partial and semipartial correlations of price with
Partial Semipartial Partial Semipartial Significance
Variable | Corr. Corr. Corr.^2 Corr.^2 Value
------------+-----------------------------------------------------------------
mpg | 0.0352 0.0249 0.0012 0.0006 0.7693
weight | 0.5488 0.4644 0.3012 0.2157 0.0000
foreign | 0.5402 0.4541 0.2918 0.2062 0.0000
It is however not possible to do when having categorical variables.
e.g if I wanted to incorporate age as an category i.age
Is there a way to get partial and semipartial correlation when having categorical variables. (or to adjust for the effect of them).
The regress command give the overall R-squared value for the entire model but not for the individual variables.
Is there a way to get this with the pcorr or doing further analysis after the regress command?
Using Stata 13.1 on a windows 7-64bit pc
Kind Regards
Dennis Nielsen
Comment