Displaying 12 results from an estimated 12 matches for "mjcraw".
2011 Jun 01
1
different results from lme() and lmer()
Hello R-help,
I'm studying an example in the R book.?
The data file is available from the link below.http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/fertilizer.txt
Could you explain Why the results from lme() and lmer() are different in the following case? In other examples, I can get the same results using the two functions, but not here...?
Thank you.Miya
library(lme4)library(nlme)# object dat contains the data
> summary(lme...
2007 Jul 05
3
data messed up by read.table ? (PR#9779)
...ull_Name: Joerg Rauh
Version: 2.5.0
OS: Windows 2000
Submission from: (NULL) (84.168.226.163)
Following Michael J. Crawley "Statistical Computing" on page 9 the worms.txt is
required. After downloading it from the book's supporting website, which is
http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/ I visually check the data
against the book and they look identical. Then I do a read.table as suggested:
worms<-read.table("C:/Programme/R/R-2.5.0/Data/Worms.txt", header = T).
Typing "worms" to see the data, it's no longer the same: Four lines have been
a...
2007 Aug 28
1
subcripts on data frames (PR#9885)
I'm not sure if this is a bug, or if I'm doing something wrong.
=20
=46rom the worms dataframe, which is at in a file called worms.txt at
=20
http://www.imperial.ac.uk/bio/research/crawley/therbook
<http://www.imperial.ac.uk/bio/research/mjcraw/therbook/index.htm>=20
=20
the idea is to extract a subset of the rows, sorted in declining order
of worm density, with only the maximum worm density from each vegetation
type:
=20
worms<-read.table("c:\\temp\\worms.txt",header=3DT)
attach(worms)
names(worms)
[1] "Field.Name...
2010 Jun 08
1
Getting started
Hi,)
I am just getting started with R but have hit an early snag. I am working through Crawley (2008) The R Book and on page 6, 'Significance Stars', I am trying to enter the commands given. However, 'Gain.txt' does not seem to have been downloaded when I downloaded the R programme.
I have searched for it in case it put it somewhere other than 'temp' but I cannot find it.
2010 Dec 16
1
Code for The R Book
Hello Everyone,
Does anyone have the R code for this book? I contacted the author about this and was told that it used to be on the book's website, but that the publisher had asked that it be taken down. I'm hoping that someone will have downloaded the code when it was available, and that they will be willing to share it with me.
The book is almost 1,000 pages long and I'd like to
2003 Feb 13
1
fixed and random effects in lme
Hi All,
I would like to ask a question on fixed and random effecti in lme. I am
fiddlying around Mick Crawley dataset "rats" :
http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/
The advantage is that most work is already done in Crawley's book (page 361
onwards) so I can check what I am doing.
I am tryg to reproduce the nested analysis on page 368:
model<-aov(Glycogen~Treatment/Rat/Liver + Error(Treatment/Rat/Liver), rats)
using lme.
The code:...
2012 Feb 03
1
ordering of factor levels in regression changes result
...f significant coefficients in the solution.
I was surprised at this and want to know how I should choose the order of the factors, if the order affects the result.
Here is the small example. It is taken from 'The R Book', Crawley p. 365.
The data is at
http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/competition.txt
In R
> comp<-read.table("C:\\Temp\\competition.txt", header=T)
> attach(comp)
Data has dependent variable 'biomass' and different types of 'clipping' that were done:
Control (none), n25, n50, r10, r5:
> summary(comp)...
2006 Aug 30
1
lmer applied to a wellknown (?) example
...eadings (Glycogen) are taken from each liver preparation (36 readings).
We want to test if treatments has affected the glycogen levels. The
readings are nested in preparation and the preparations nested in rats.
The data can be found here (or on p. 289 in Sokal):
http://www.bio.ic.ac.uk/research/mjcraw/statcomp/data/rats.txt
//
I was hoping to use the rat example as some kind of reference on my way
to understand mixed models and using lmer. However, first I wish someone
could check my suggested models!
My suggestions:
attach(rats)
rats$Glycogen <- as.numeric(Glycogen)
rats$Treatment <-...
2002 Dec 02
2
Crawley's book on S-Plus and one strangeness
Hi,
I have got to my hands an excellent book by Michael J. Crawley
``Statistical Computing: An Introduction to Data Analysis using
S-Plus'' (John Wiley & Sons, Ltd, ISBN 0-471-56040-5). Its beauty
for me is in the fact, that it is more of ``An Introduction to
Data Analysis'' than ``using S-Plus'', but I guess that it may be
of interest for many others.
Most of the
2008 Apr 04
1
lme4: How to specify nested factors, meaning of : and %in%
Hello list,
I'm trying to figure out how exactly the specification of nested random
effects works in the lmer function of lme4. To give a concrete example,
consider the rat-liver dataset from the R book (rats.txt from:
http://www.bio.ic.ac.uk/research/mjcraw/therbook/data/ ).
Crawley suggests to analyze this data in the following way:
library(lme4)
attach(rats)
Treatment <- factor(Treatment)
Rat <-factor(Rat)
Liver<-factor(Liver)
m1<-lmer(Glycogen~Treatment+(1|Treatment/Rat/Liver))
The problem that I have with this analysis is that T...
2010 Apr 15
4
Does "sink" stand for anything?
Hello Everyone,
Learning about R and its wonderful array of functions. If it's not obvious, I usually try to find out what a function stands for. I think this helps me remember better.
One function that has me stumped is "sink." Can anyone tell me if this stands for something?
Thanks,
Paul
__________________________________________________
[[alternative HTML
2012 Mar 25
2
avoiding for loops
I have data that looks like this:
> df1
group id
1 red A
2 red B
3 red C
4 blue D
5 blue E
6 blue F
I want a list of the groups containing vectors with the ids. I am
avoiding subset(), as it is
only recommended for interactive use. Here's what I have so far:
df1 <- data.frame(group=c("red", "red", "red", "blue",