How to get the OLS estimate from a regression based on a vector?
    조회 수: 8 (최근 30일)
  
       이전 댓글 표시
    
I have a vector y of dimension nx1. I want to get the OLS estimate of the regression of Δy on y_t-1 (t=1,2...n). How can I do it?
댓글 수: 0
답변 (1개)
  Jeff Miller
      
 2019년 9월 11일
        
      편집: Jeff Miller
      
 2019년 9월 11일
  
      How about this:
deltay = diff(y);
b = regress(deltay,y(1:end-1));
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Linear Regression에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

