2014년 2월 26일 수요일

How to use Stata 6. Regression Analysis [회귀분석]: Specification analysis part 2 [Component-plus-residual plots; Residual-versus-predictor plots]

1. Component-plus-residual plots (CPR)

앞서 언급했던 added-variable plot은 outliers을 확인하는데는 유용하지만, 함수 형태를 확인하는데는 사용될 수 없다. 이때 사용할 수 있는 것은 component-plus-residual plot이다. Added-variable plot은 outlier를 확인할 수 있지만, component-plus-residual plot은 그렇지 않다. 그러나, component-plus-residual plot은 함수형태의 가정(assumption)에 대한 테스트 할 수 있다. 또한 Component-plus-residual plot과 Added-variable plot 모두 그래프에 그려지는 회귀선(regression line)의 추정된 회귀 모델의 계수와 같다는 특징을 갖고 있다. 


이제 CPR plot을 그려보자. 

우선, 회귀식을 추정해보자. 


















위의 회귀식은 mpg 변수가 종속변수와 Non-linear한 관계를 보여준다. 그러나 우리가 이러한 관계에 대해 알지 못하고 단지 선형적(linear)인 관계만 있다고 가정해서 아래와 같은 회귀식을 추정했다고 해보자. 




그러나, 다른 연구자가 mpg가 종속변수와 Non-linear한 관계가 있을 것 같은 생각이 든다면, 우리는 CPR plot을 그려서 판단해 볼 수 있다. 






























mpg변수의 Non-linearity를 판단하기 위해, median spline 곡선을 함께 그렸다. 

또한, 우리는 Augmented component-plus-residual plot을 그려서 Nonlinearity를 판단할 수 있다. 





























2. Residual-versus-predictor (RVP) plots

Residual-versus-predictor plot도 회귀분석의 기본적인 가정들이 위배되는지 아닌지를 판단하는 매우 간단한 방법중의 하나이다. 만약 기본적인 가정들이 다 충족된다면 그래프에서 어떠한 패턴도 발견되어서는 안된다. 위의 추정된 식에서 mpg변수와 종속변수에 대한 RVP plot을 그려보자. 
































댓글 없음:

댓글 쓰기