Use reorder
# boxplot with increasing order of medians
s2-with(InsectSprays,reorder(spray,count,median))
with(InsectSprays,boxplot(count~s2))
# boxplot with decreasing order of medians
s2-with(InsectSprays,reorder(spray,-count,median))
with(InsectSprays,boxplot(count~s2))
John
Adai,
I recently came across the following definition of a statistic
which may be relevent to the discussion.
John
-
Berans (2003) provocative definition of statistics as the study of
algorithms for data analysis elevates computational considerations to the
forefront of the field. It is
Mike,
use ---
VarCorr(lme.object)
or for a user friendly output use varcomp from the 'ape' package--
require(ape)
varcomp(lme.object)
varcomp also allows scaling of components to unity (*100 gives %)
and also allows for cumulative sum of components.
Note. varcomp doesn't work for lmer
Ronaldo,
According to Douglas Bates's paper in 'R' News, It would seem that the
correct model for nested split plot random effects with lmer , in your
example ,with x2 nested within x1, would be --
lmer(y~x1 + x2 +(1|x1)+(1|x1:x2))
Try it with your model any see how it compares with your aov
Dennis
Try
TEST[-3]
[[1]]
[1] A1 A2
[[2]]
[1] B1 B2
for removing more than one element from the list (say 2 3) --
TEST[-c(2,3)]
[[1]]
[1] A1 A2
HTH
John
Dennis Fisher wrote---
Colleagues,
I have created a list in the following manner:
TEST- list(c(A1, A2), c(B1, B2),
Leaf,
using your example data as 'dat' below --
dat-read.table(clipboard,header=T)
dat
XYZ
1 22.0 24.0 4.3
2 2.3 3.4 5.3
3 57.2 23.4 34.0
#to order the data frame by say X (for column 1)--
dat1-dat[order(dat[,1]),]
dat1
XYZ
2 2.3 3.4 5.3
1 22.0 24.0 4.3
3
Ronaldo ,
It looks as though you have specified you model incorrectly.
In the Rats example ,the Treatment is the only fixed effect,Rat and Liver
are random effects
In aov testing for sig of 'Means' of Random Effects is pointless and that is
why 'p' values are not given.Further more the
778.78 33.00 18.335 4.419e-06 ***
which agrees with the aov model below.
model - aov(Glycogen~Treatment+Error(Rat/Liver))
summary(model)
John
-Original Message-
From: John Wilkinson (pipex) [mailto:[EMAIL PROTECTED]
Sent
Adai,
The following works.Perhaps you should define your 'upper' and 'lower'
in the list as aov's, as you have done with your lo,hi and mid.
John
stepAIC( mid, scope=list(upper = mid , lower = lo) )
Start: AIC= -594.66
y ~ x2 + x3
Df Sum of Sq RSS AIC
- x21 0.11
a.d.
I refer you to ?title and its given examples.
try this --
plot(rnorm(10),rnorm(10),xlab= ,ylab= )
title(xlab=year,
ylab=expression(paste('M x'*10^{3},)),font=2)
note that 'title()' will alos accept a list for x and y labs,
for additional parameters,e.g., 'col' and 'cex'
John
a.d
Gabor,
I thought that I had worked around the 'expression' format problem,
but if the x-y labels are to be bold, then using,say, cex.lab=1.25in the
title(), appears to simulate 'bold' font very well, both for the ylab maths
expression and xlab text.
Your solution is the rigorous one!
John
John,
In addition to 'VarCorr(nlme) and VarCorr(Matrix)', you could also try
'varcomp' function in the 'ape' package.This requires an 'lme' class of
file, from the 'nlme package as input.It additionally gives the options to
scale the components by normalizing them (both cumulatively and in
Dimitris,
wouldn't this be more precise ---
sapply(jj,function(x) which(x$b[1]==4))
[[1]]
[1] 1
[[2]]
numeric(0)
[[3]]
[1] 1
John
Dimitris wrote ---
maybe something like this:
jj - list(list(a = 1, b = 4:7), list(a = 5, b = 3:6), list(a = 10, b
= 4:5))
###
jj[sapply(jj,
Hi ,
I am attempting to format the 'identify' function labels.
I can format the colour but the 'cex' parameter appears not to work
for me.
example--
x-1:5
y-1:5
plot(x,y)
identify(x,y,cex=0.5,col=2)
[1] 3
The label is coloured red but the 'cex=0.5' does not reduce
the label size. Why
Dear R-users,
I am having a problem formatting a two line plot title with the first line
text and the second line an expression. I cant get the second line
expression to line up with the first by starting at the LHS of the line.
A simple example illustrates the situation.
15 matches
Mail list logo