急!!高分跪求matlab高手!!解多元線性迴歸模型

時間 2021-08-30 10:50:17

1樓:匿名使用者

>> y1=[46.78 43.42 37.64]';

y2=[36.05 37.43 31.63]';

y3=[10.73 5.99 6.01]';

x1=[-6.08 -4.77 0.12]';

x2=[71.32 61.85 71.14]';

x3=[25.88 23.39 19.46]';

x4=[0.85 11.18 12.02]';

x5=[19.69 19.66 19.66]';

x6=[-0.71 -2.97 -0.17]';

x=[ones(3,1),x1,x2,x3,x4,x5,x6];

[b1,bint1,r1,rint,stats1] = regress(y1,x);

b1,bint1,stats1

[b2,bint2,r2,rin2,stats2] = regress(y2,x);

b2,bint2,stats2

[b3,bint3,r3,rin3,stats3] = regress(y3,x);

b3,bint3,stats3

warning: x is rank deficient to within machine precision.

> in regress at 82

b1 =00

0.0598

1.6387

0.124600

bint1 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats1 =

1 nan nan nan

warning: x is rank deficient to within machine precision.

> in regress at 82

b2 =00

-0.0382

1.4831

0.456100

bint2 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats2 =

1 nan nan nan

warning: x is rank deficient to within machine precision.

> in regress at 82

b3 =00

0.0979

0.1556

-0.331600

bint3 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats3 =

1 nan nan nan

>> rank(x)

ans =

3說明x1-x6線性相關

2樓:手機使用者

你這個做不出來的 資料量必須大於自變數的量才能做 而且在相差不大的情況下做出來的效果很差 你這有6個自變數 至少10-20個資料做出來才勉強靠譜 低於6個資料根本回歸不了

我不要你分 請虔誠的默唸“保佑llb同學多元迴歸分析拿a”30遍 謝謝

急!!跪求matlab高手 多元線性迴歸模型求解!高分! 80

3樓:匿名使用者

5個未知數,3個方程是沒有辦法擬合的,請給出跟多資料;

建議你看下cftool這個函式

4樓:匿名使用者

>> y1=[46.78 43.42 37.64]';

y2=[36.05 37.43 31.63]';

y3=[10.73 5.99 6.01]';

x1=[-6.08 -4.77 0.12]';

x2=[71.32 61.85 71.14]';

x3=[25.88 23.39 19.46]';

x4=[0.85 11.18 12.02]';

x5=[19.69 19.66 19.66]';

x6=[-0.71 -2.97 -0.17]';

x=[ones(3,1),x1,x2,x3,x4,x5,x6];

[b1,bint1,r1,rint,stats1] = regress(y1,x);

b1,bint1,stats1

[b2,bint2,r2,rin2,stats2] = regress(y2,x);

b2,bint2,stats2

[b3,bint3,r3,rin3,stats3] = regress(y3,x);

b3,bint3,stats3

warning: x is rank deficient to within machine precision.

> in regress at 82

b1 =00

0.0598

1.6387

0.124600

bint1 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats1 =

1 nan nan nan

warning: x is rank deficient to within machine precision.

> in regress at 82

b2 =00

-0.0382

1.4831

0.456100

bint2 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats2 =

1 nan nan nan

warning: x is rank deficient to within machine precision.

> in regress at 82

b3 =00

0.0979

0.1556

-0.331600

bint3 =

0 0

0 0

nan nan

nan nan

nan nan

0 0

0 0

stats3 =

1 nan nan nan

>> rank(x)

ans =

3說明x1-x6線性相關

5樓:

為什麼不用excel呢?

matlab解多元線性迴歸——急急急,好的我加100分

6樓:匿名使用者

你的資料有問題 第三組資料 是非線性的 要刪去 然後就好用了

你可以看看 我做的圖

7樓:匿名使用者

clear all;

x1=[0.1112356 0.1153416 0.1186045 0.1227 0.1298]';

x2=[0.371655 0.3871 0.4124 0.4118 0.448]';

x3=[0.48968 0.489452 0.489572 0.491521 0.494584]';

x4=[0.013 0.0124 0.0121 0.0119 0.0115]';

y=[0.006975 0.006472 0.006026 0.005889 0.005908]';

a=[x1 x2 x3 x4];

x=[ones(size(x1)),a];

alpha=0.05;

[b,bint,r,rint,stats]=regress(y,x,alpha)

rcoplot(r,rint)

%bint都是nan???

%做個記號

matlab急求大神幫忙!!!跪求大神幫忙做個多元線性規劃的matlab模型。

8樓:匿名使用者

>> x=[128453,102398,28774,90302,128.6,64.1,64.5;

129227,116694,28559,90976,124.1,64.0,60.1;

129988,136515,27947,92184,122.9,64.2,58.7;

130756,182321,26504,94197,124.0,65.1,58.9;

131448,209407,25961,95068,120.9,68.1,52.8;

132129,246619,25660,95823,121.0,69.3,51.7;

132802,300670,25166,96681,121.4,70.6,50.8;

133474,335353,24663,97502,121.3,70.8,50.5];

y=[9377,9692,9857,10055,10419,10636,10956,11309]';

b=regress(y,x)

warning: x is rank deficient to within machine precision.

> in regress at 82

b =1.0078

0.0000

-1.0074

-1.0084

-1.1377

01.7495

>> format long

>> b

b =1.007801520858404

0.000030873005326

-1.007447292805085

-1.008387438210722

-1.137728205821926

01.749524312878069

%警告的意思是x各列之間有線性相關的,所以regress會自動將x將某些列的係數置為0,使剩下的列線性相關。

9樓:521李

x=[ 128453,102398,28774,90302,128.6,64.1,64.5;

129227,116694,28559,90976,124.1,64.0,60.1;

129988,136515,27947,92184,122.9,64.2,58.7;

130756,182321,26504,94197,124.0,65.1,58.9;

131448,209407,25961,95068,120.9,68.1,52.8;

132129,246619,25660,95823,121.0,69.3,51.7;

132802,300670,25166,96681,121.4,70.6,50.8;

133474,335353,24663,97502,121.3,70.8,50.5];

y=[9377,9692,9857,10055,10419,10636,10956,11309]

y =columns 1 through 5

9377 9692 9857 10055 10419

columns 6 through 8

10636 10956 11309

高分跪求高手翻譯以下古文,高分跪求英文高手翻譯

這篇是現代人寫的古文吧!其文句出處根本無據可查!君子之德風 小人之德草 草之風 必偃 七年夏任將安 四境之內 集眾而謀 復求拂士 循其本 起於盛世 吏民之諫已久矣 何期群小弄權 縱人風流 草莽當道 請獻千金 間其中 謂之權貴 笑看風月而不已 於是 家國敗壞 社稷可有累卵之危 生靈可有塗炭之虞 長此以...

高分跪求作文,急啊,高分跪求一篇作文,急啊!

說得好放歌 秋天的田野 一天下午,我吃過晚飯,到田野裡散步。這時已經是傍晚了,那奔波了一天的太陽,又紅又大,像一個大火球,又彷彿是掛在天邊的大紅的燈籠。一條田間小溪在田野裡歡快的流淌,蜿蜒著流向遠方,一些樹葉落在上面,變成一隻只金色小帆船,隨著溪流向遠處航行。餘暉灑在了小溪上小溪上乏著金光,像披上了...

債務問題,比較複雜,跪求法律高手進。高分追加。解決問題後現金重酬

看了一下,不排除那2個所謂的債主可能是惡意和你爸串通的,你可以要求他們出示當時借錢的方式,現金就要提款憑單,轉賬就要轉賬記錄。特別是40萬的那筆,對於你們當時的經濟水平,對方為什麼不需要擔保,或想到和你母親交流一下就把錢給你父親,從動機和對方的過錯上可以提出你母親是完全不知道這筆借款。和你父親,和對...