单因素协方差分析+aoctool+MATLAB代码 - 知乎专栏
文章推薦指數: 80 %
单因素协方差分析+aoctool+MATLAB代码 · 直线回归关系 · 对回归关系假设检验,Slope为直线斜率,p值为0,小于默认0.05,则认为需要矫正 · 说明xx和group均有 ... 首发于算法小记无障碍写文章登录/注册问题:算法原理:MATLAB代码:clear; %%%firstsetofdata %xx=[36302623263020192016282727242523201817202833262223202223181732232723272820241917];%independentvariable %yy=[89807480856873688058648173677767646559575562585866556071554852586462545455445151];%dependentvariable %group=[ones(1,10),2*ones(1,10),3*ones(1,10),4*ones(1,10)]; %[h,atab,ctab,stats]=aoctool(xx,yy,group,[],[],[],[],[],'parallellines'); %%secondsetofdata xx=[15,13,11,12,12,16,14,17,17,16,18,18,21,22,19,18,22,24,20,23,25,27,30,32];%independentvariable yy=[85,83,65,76,80,91,84,90,97,90,100,95,103,106,99,94,89,91,83,95,100,102,105,110];%dependentvariable group=[ones(1,8),2*ones(1,8),3*ones(1,8)]; [h,atab,ctab]=aoctool(xx,yy,group,[],[],[],[],[],'parallellines'); %% b=cell2mat(ctab(end,2)); temp=yy; y0Ba=mean(xx); temp=temp-b*(xx-y0Ba); [p,tbl,stats]=anova1(temp,group); c=multcompare(stats);运行结果:直线回归关系对回归关系假设检验,Slope为直线斜率,p值为0,小于默认0.05,则认为需要矫正说明xx和group均有显著影响矫正之后的group有显著影响group2影响最大,group1次之,group3最后答:三种饲料对猪的催肥有极其显著的不同,A2饲料最好,初始重量与猪增加的重量有极其明显的关系发布于2019-08-0218:40协方差方差分析赞同2添加评论分享喜欢收藏申请转载文章被以下专栏收录算法小记
延伸文章資訊
- 1matlab图像频谱分析代码_单因素协方差分析+aoctool+MATLAB ...
matlab图像频谱分析代码_单因素协方差分析+aoctool+MATLAB代码. weixin_39898733 于 2020-11-22 03:24:37 发布 174 收藏 ...
- 2aoctool - Interactive analysis of covariance - MathWorks
aoctool(x,y,group) fits a separate line to the column vectors, x and y , for each group defined b...
- 3aoctool : Advent of Code Downloader / Initializer - GitHub
aoctool : Advent of Code Downloader / Initializer. The AOC tool is an opinionated and configurabl...
- 4Using the Statistics Toolbox (Statistics Toolbox)
The Statistics Toolbox has a small data set named carsmall with information about cars. It is a g...
- 5MATLAB: Using aoctool for a 1-way ANCOVA (+plot)
MATLAB: Using aoctool for a 1-way ANCOVA (+plot). plotstatistics. I have two groups of subjects, ...