Mashinali o‘qitishga kirish Nosirov Xabibullo xikmatullo o‘gli Falsafa doktori (PhD), tret kafedrasi mudiri


Download 1.54 Mb.
bet1/5
Sana02.01.2022
Hajmi1.54 Mb.
#194061
  1   2   3   4   5
Bog'liq
Mashinali oqitishga kirish 10-maruza Nosirov Kh

Mashinali o‘qitishga kirish

Nosirov Xabibullo xikmatullo o‘gli Falsafa doktori (PhD), TRET kafedrasi mudiri

Ko‘p o‘zgaruvchili chiziqli regressiya

Nosirov Xabibullo xikmatullo o‘gli Falsafa doktori (PhD), Dotsent, TRET kafedrasi mudiri

Linear Regression

% Calculating the regression coefficient

close all

x = linspace(0,1,100); % Data from your first column/independent variable

y = x + rand(1, length(x)); % Data from your second column/dependent variable

% Compute the mean of your data

yhat = mean(y);

xhat = mean(x);

% Compute regression coefficients in the least-square sense

b = (x - xhat)*(y' - yhat)/sum((x - xhat).^2); % Regression coefficient

a = yhat - b*xhat; % Y-intercept

% Plot data

figure()

scatter(x, y);

hold on

plot(x, a + b*x, 'r');

legend(['b = ' num2str(b)]); % Your regression coefficient is b

Multivariate regression model for panel data with different intercepts


Download 1.54 Mb.

Do'stlaringiz bilan baham:
  1   2   3   4   5




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling