locust | R Documentation |
This data set was presented by MacDonald and Raubenheimer (1995) and analyze the effect of hunger on locomotory behaviour of 24 locust (Locusta migratoria) observed at 161 time points. The subjects were divided in two treatment groups ("fed" and "not fed"), and within each of the two groups, the subjects were alternatively "male" and "female". For the purpose of this analysis the categories of the response variable were "moving" and "not moving". During the observation period, the behavior of each of the subjects was registered every thirty seconds.
data(locust)
A data frame with 3864 observations on the following 7 variables.
id
a numeric vector that identifies de number of the individual profile.
move
a numeric vector representing the response variable.
sex
a factor with levels 1
for "male" and 0
for "female".
time
a numeric vector that identifies de number of the time points observed.
The time
vector considered was obtained dividing (1:161) by 120 (number of observed periods in 1 hour).
feed
a factor with levels 0
"no" and 1
"yes".
The response variable, move
is the binary type coded as 1
for "moving" and 0
for "not moving".
The sex
covariate was coded as 1
for "male" and 0
for "female". The feed
covariate indicating the treatment group,
was coded as 1
for "fed" and 0
for "not fed". Azzalini and Chiogna (1997) also have analyze this
data set using their S-plus
package rm.tools
.
MacDonald, I. and Raubenheimer, D. (1995). Hidden Markov models and animal behaviour. Biometrical Journal, 37, 701-712
Azzalini, A. and Chiogna, M. (1997). S-Plus Tools for the Analysis of Repeated Measures Data. Computational Statistics, 12, 53-66
str(locust)
#### dependence="MC2"
locust2_feed1 <- bild(move~(time+I(time^2))*sex, data=locust,
subSET=feed=="1", aggregate=sex, dependence="MC2")
summary(locust2_feed1)
plot(locust2_feed1, which=5, ylab="probability of locomoting",
main="Feed=1", add.unadjusted=TRUE)
locust2 <- bild(move~(time+I(time^2))*feed, data=locust,
aggregate=feed, dependence="MC2")
par(mfrow=c(2,2))
plot(locust2, which=1)
plot(locust2, which=2)
plot(locust2, which=3)
plot(locust2, which=4)
par(mfrow=c(1,1))
plot(locust2, which=5, ylab="probability of locomoting",
add.unadjusted=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.