Description Usage Arguments Details Value Note Author(s) See Also Examples
This function use large sample approximation to visualize a permutation class after user performed a treeperm test.
1 2 |
x |
The treeperm class to be visualized |
size |
The size of simulated distribution |
... |
Not necessarily required, this is reserved for future extensions. |
This function is independent of the type of permutation (either exact or approximate) contained in the treeperm object. It will use the stored data and factor in treeperm create an asymptotic permutation distribution and plot that distribution.
A histogram for visualization.
This function simulates a distribution for a given distribution. Please set the random seed in advance.
Qiao Kang
treeperm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | value<-c(0,190,0,0,10,0,0,0,0,0,0,110,0,0,52,0,8,0,50,0,0,137,965,110)
label<-as.factor(c(1,1,1,2,2,2,1,1,1,2,2,2,1,1,1,2,2,2,1,1,1,2,2,2))
data<-data.frame(label,value)
exact<-treeperm(value~label,frame=data,type="exact")
plot(exact,size=999)
function (x, size, ...)
{
ran <- GetDistribution(x, size)
r <- hist(ran, breaks = 50, main = "Permutations estimated by Monto carlo method",
xlab = "F statistics", ylab = "Frequency", col = "lightblue")
top <- max(r$counts)
points(x$Fstatistics, -top/150, type = "p", pch = 17, col = "red",
lwd = 3)
text(x$Fstatistics, -top/50, cex = 0.65, "Observed F statistics")
}
|
[1] 24.33333
function (x, size, ...)
{
ran <- GetDistribution(x, size)
r <- hist(ran, breaks = 50, main = "Permutations estimated by Monto carlo method",
xlab = "F statistics", ylab = "Frequency", col = "lightblue")
top <- max(r$counts)
points(x$Fstatistics, -top/150, type = "p", pch = 17, col = "red",
lwd = 3)
text(x$Fstatistics, -top/50, cex = 0.65, "Observed F statistics")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.