Description Usage Arguments Value Author(s) Examples
Eta coefficient for nominal/interval data.
1 |
x |
Independent nominal variable (factor or numeric). |
y |
Dependent interval variable (numeric). |
breaks |
If |
na.rm |
Logical. Indicating if |
Eta coefficient
Mark Heckmann
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | attach(d.eta) # using d.eta dataset
eta(x1, y)
# removing missing data
eta(c(x1, 2), c(NA, y), na.rm=TRUE) # NA added to y to show NA behaviour
# classify interval data x
eta(x, y, breaks=c(1, 4, 7,10))
# visualize classication
plot(x, y)
abline(v=c(1, 4, 7,10))
# setting number of breaks for classification
eta(x, y, breaks=7)
|
[1] 0.6681451
[1] 0.0569353
[1] 0.6696627
[1] 0.8613785
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.