Displaying 1 result from an estimated 1 matches for "normtest".
2006 Oct 25
1
density plot text
...'t
mean the x and y limits of a plot, but rather can I change the dimensions of
the default (square) graphics device?
Many thanks
Murray
try <- (rnorm(100, mean = 5, sd = 3))
library(lattice)
trellis.device(col = FALSE, theme = lattice.getOption("col.whitebg"))
densityplot(~try)
normtest <- shapiro.test(try)
normtest
pvalue <- round(normtest$p.value,5)
normtext <- paste(normtest$method,"p-value =",pvalue)
normtext
xcoord <- max(try)*0.6
text(xcoord,0.1,normtext)
# alternative
plot(density(try))
text(0,0.1,normtext)
--
Murray Pung
Statistician, Datapharm A...