Description Usage Arguments Value Note Author(s) References Examples
Return the correlation through the origin of two vectors. Generally used for indepdendent contrasts
1 | cor.origin(x, y)
|
x |
A vector |
y |
A vector (of same size as x) |
The correlation of x and y, from a model without intercept (i.e., forcing the line through the origin).
This is a very simple function, provided for convenience. You
can obtain the p-value, if you wish, with the usual formula for the
t-statistic: 2*(1 - pt(sqrt(df) * abs(rho) / sqrt(1 - rho^2),
df))
where rho is the correlation through the origin and df are the
appropriate degrees of freedom —generally N-1—; by using the
absolute value of the coefficient and finding 2 * the probability of
upper tail (1 - pt) this works for both positive and negative
correlation coefficients.
R. Diaz-Uriarte and T. Garland, Jr.
Diaz-Uriarte, R., and Garland, T., Jr., in prep. PHYLOGR: an R package for the analysis of comparative data via Monte Carlo simulations and generalized least squares approaches.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.