How to calculate StdErr for intercepts and slopes in a multivariate ANCOVA (function ANOVAN() with continuous independent variable)?

조회 수: 4 (최근 30일)
I am trying to do multivariate analysis of covariance (mANCOVA) with Matlab. There is a special GUI for it called aoctool(), but it works only for one categorial independent variable (CIV) and one covariate. So if I have two CIVs and/or two covariates, I need something else.
Fortunately, anovan() tool, initially made for n-way ANOVA, could deal with continuos independent variables. So it is possible to perform mANCOVA using this tool and it really works! One can make and tests hypothesis on variance of slopes and treatments, but to provide a comperehensive analysis one needs to compare individual models (slopes or intercepts) to find differenes between them. But stats structure in anovan() outputs contains only values of model coefficients (stats.coeffs) but not their StdErr, SSE etc. So one can not test hypothesis on equality of two slopes (using t-test). Strictly speaking, there are no multcompare() for slopes in mANCOVA.
Can somebody give me an advice (or just any help), how I can borrow data on slopes StdErr or SSE from anovan() with continuous independent variable?
Thanks, Alex.

채택된 답변

Jeff Miller
Jeff Miller 2022년 1월 5일
If you set up dummy variables to code your categorical independent variables, you can then do analysis of covariance with fitlm. The advance of that is that you can then use regression techniques to get standard errors and confidence intervals for the model coefficients. Maybe there is an easier way, though.
  댓글 수: 5
Jeff Miller
Jeff Miller 2022년 1월 7일
Hi Alex, No, I don't recommend that you change coding methods if you have one that gives you what you need. I just thought the other coding method might be helpful if rank deficiency was blocking you.
Alex Sabrekov
Alex Sabrekov 2022년 1월 7일
As I understand, this rank deficiency is a universal and obligate property of certain linear model formulations, and it doesn't really influence on slope estimates.
Thanks again for the idea of dummy variables! I have heard with half an ear about it, but thought that it is too complicated for me. But now I realize that this is the only way to solve these problems properly. Using fitlm() also gives one an ability to estimate model with a certain confidence interval, that is necesarry for result's reporting. So there is no need to search a new tricky software.

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

추가 답변 (0개)

카테고리

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