Linear regression in matlab

조회 수: 2 (최근 30일)
Sarah Yun
Sarah Yun 2019년 12월 3일
댓글: Image Analyst 2019년 12월 3일
Hi,
I have two variables as text files loaded in Matlab.
They are vegeation cover (dependent variable ) and temperature (independent variable)
I want to use linear regression analysis to estimate the proportion (as a percentage) of variance in vegetation cover controlled by variance in air temperature.
I do not understand the 'variance' part?
Code so far...
S = load('../vegetation.txt')
% Load air temperature
T = load('../airtemp.txt')
% calculate linear regression
mdl = fitlm(S, T, 'linear', 'RobustOpts','on');
Thank you.
  댓글 수: 1
Image Analyst
Image Analyst 2019년 12월 3일
I don't either. But you're the one who said it, not me. Didn't you?
Are you trying to use Principal Components Analysis to try to find the variation in vegetation cover that is explained by variation in the first or second Principal Component?
Or are you merely trying to fit a line through the data and compute the residuals?

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Regression에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by