Diff for "FAQ/orthopolys" - CBU statistics Wiki
location: Diff for "FAQ/orthopolys"
Differences between revisions 7 and 10 (spanning 3 versions)
Revision 7 as of 2012-07-07 17:50:53
Size: 161
Editor: circle3
Comment: LFYKnr , [url=http://ruzewfgtnbai.com/]ruzewfgtnbai[/url], [link=http://pdbetaqaeupa.com/]pdbetaqaeupa[/link], http://psmpzkqixojo.com/
Revision 10 as of 2014-08-13 14:31:49
Size: 1260
Editor: PeterWatson
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
LFYKnr , [url=http://ruzewfgtnbai.com/]ruzewfgtnbai[/url], [link=http://pdbetaqaeupa.com/]pdbetaqaeupa[/link], http://psmpzkqixojo.com/
----
CategoryCategory
= Fitting linear orthogonal polynomials =

A linear polynomial assumes that three or more groups have an ordering e.g. A>B>C and that the distances between each successive pair of groups are equal. This may be tested by specifying contrast coefficients in an anova.

The contrast coefficients may be obtained in R using contr.poly(p) for a polynomial of degree p. Table sof p9olynomial contrast coefficients are also available in Biometrika tables.

{{{
contr.poly(4,contrasts=TRUE)
}}}

Specific contrast coefficients can also be obtained assuming unequal distances between groups but the ratio of these differences must be specified e.g. if groups B and C are twice as far from each other as groups A and B then contrast coefficients may be obtained
using, for example, R.

{{{
> x <- c(1,2,4)
> poly(x,degree,1)
}}}

If you suspect the groups are unequally spaced but do not know by how much then either fit a quadratic polynomial in addition to a linear one using a second set of contrast coefficients or use a nonparametric procedure such as [[FAQ/JonckheereTrendTest| Jonckheere's Trend Test]].

__Reference__

Biometrika tables for Statisticians Volume 1 (1954) Edited by Pearson, ES and Hartley, HO. Cambridge University Press.

Fitting linear orthogonal polynomials

A linear polynomial assumes that three or more groups have an ordering e.g. A>B>C and that the distances between each successive pair of groups are equal. This may be tested by specifying contrast coefficients in an anova.

The contrast coefficients may be obtained in R using contr.poly(p) for a polynomial of degree p. Table sof p9olynomial contrast coefficients are also available in Biometrika tables.

contr.poly(4,contrasts=TRUE)

Specific contrast coefficients can also be obtained assuming unequal distances between groups but the ratio of these differences must be specified e.g. if groups B and C are twice as far from each other as groups A and B then contrast coefficients may be obtained using, for example, R.

> x <- c(1,2,4)
> poly(x,degree,1)

If you suspect the groups are unequally spaced but do not know by how much then either fit a quadratic polynomial in addition to a linear one using a second set of contrast coefficients or use a nonparametric procedure such as Jonckheere's Trend Test.

Reference

Biometrika tables for Statisticians Volume 1 (1954) Edited by Pearson, ES and Hartley, HO. Cambridge University Press.

None: FAQ/orthopolys (last edited 2020-02-11 16:12:26 by PeterWatson)