필터 지우기
필터 지우기

Multiple regression analysis, categorial variables, continuous variable

조회 수: 2 (최근 30일)
KKR
KKR 2012년 1월 12일
Hi, I would like to run a multiple regression where my dependent variable is continuous. One of my independent variable is continuous, and the other independent variable is a category (small cap, midcap, largecap). I am not sure how to construct categorical independent variable. Do I have to use dummyvar function or can I just use 0 and 1 (1 for the category that applies to the observation).
Thank you in advance.

채택된 답변

bym
bym 2012년 1월 12일
as long as you have one category variable, you can use just (0,1).
If , for example you had more than one category (small cap , mid cap, large cap); (public,private);(transportation,conglomerate,medical,etc) you would have to use dummyvar

추가 답변 (1개)

KKR
KKR 2012년 1월 12일
Thank you for your quick response. So, I should just add three more columns (with zeros and ones) with first one(continuous variale) and run a normal regression. Correct?
  댓글 수: 1
bym
bym 2012년 1월 12일
that would be a good start, not knowing the nature of your data it would be difficult to comment further

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Analysis of Variance and Covariance에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by