Learn R Programming

Sleuth2 (version 2.0-7)

case0602: Mate Preference of Platyfish

Description

Do female Platyfish prefer male Platyfish with yellow swordtails? A.L. Basolo proposed and tested a selection model in which females have a pre-existing bias for a male trait even before the males possess it. Six pairs of males were surgically given artificial, plastic swordtails---one pair received a bright yellow sword, the other a transparent sword. Females were given the opportunity to engage in courtship activity with either of the males. Of the total time spent by each female engaged in courtship during a 20 minute observation period, the percentages of time spent with the yellow-sword male were recorded.

Usage

case0602

Arguments

Format

A data frame with 84 observations on the following 3 variables.

Proportion

The proportion of courtship time spent by 84 females with the yellow-sword males

Pair

Factor variable with 6 levels---"Pair 1", "Pair 2", "Pair 3", "Pair 4", "Pair 5" and "Pair 6"

Length

Body size of the males

References

Basolo, A.L. (1990). Female Preference Predates the Evolution of the Sword in Swordtail Fish, Science 250: 808--810.

Examples

Run this code
str(case0602)
boxplot(Proportion~Pair, case0602, ylab="Proportion")

#as in Display 6.5 
summary(aov(Proportion~Pair, case0602))

n.fish  <- with(case0602, tapply(Proportion, Pair, length))
av.fish <- with(case0602, tapply(Proportion, Pair, mean))
sd.fish <- with(case0602, tapply(Proportion, Pair, sd))
male.body.size <- with(case0602, tapply(Length, Pair, unique))
mean.body <- mean(male.body.size)
table.fish <- data.frame(n.fish, round(av.fish*100,2),
                         round(sd.fish*100,2), male.body.size,
                         2*(male.body.size-mean.body))
names(table.fish) <- c("n", "average", "sd", "male.body.size", "coefficient")
s.pooled <- with(table.fish, round(sqrt(sum(sd^2*(n-1))/sum(n-1)),2))
g <- with(table.fish, sum(average*coefficient))
se.g <- with(table.fish, round(s.pooled*sqrt(sum(coefficient^2/n)),2))
g/se.g

Run the code above in your browser using DataLab