Learn R Programming

Sleuth3 (version 1.0-3)

case0901: Effects of Light on Meadowfoam Flowering

Description

Meadowfoam is a small plant found growing in moist meadows of the US Pacific Northwest. Researchers reported the results from one study in a series designed to find out how to elevate meadowfoam production to a profitable crop. In a controlled growth chamber, they focused on the effects of two light--related factors: light intensity and the timeing of the onset of the ligth treatment.

Usage

case0901

Arguments

Format

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

Flowers

average number of flowers per meadowfoam plant

Time

time light intensity regiments started; 1=Late, 2=Early

Intensity

light intensity (in \(\mu\)mol/m\(^2\)/sec)

Examples

Run this code
# NOT RUN {
str(case0901)
attach(case0901)

## EXPLORATION
plot(Flowers ~ Intensity, pch=ifelse(Time ==1, 19, 21))
myLm <- lm(Flowers ~ Intensity + factor(Time) + Intensity:factor(Time)) 
plot(myLm, which=1) 
summary(myLm)  # Note p-value for interaction term

# INFERENCE
myLm2 <- lm(Flowers ~ Intensity + factor(Time)) 
summary(myLm2)         
confint(myLm2)         

# DISPLAY FOR PRESENTATION
plot(Flowers ~ jitter(Intensity,.3),   
  xlab=expression("Light Intensity ("*mu*"mol/"*m^2*"/sec)"), # Include symbols
  ylab="Average Number of Flowers per Plant",
  main="Effect of Light Intensity and Timing on Meadowfoam Flowering",
  pch=ifelse(Time ==1, 21, 22), bg=ifelse(Time==1, "orange","green"),
  cex=1.7, lwd=2)          
beta <- myLm2$coef  
abline(beta[1],beta[2],lwd=2, lty=2) 
abline(beta[1]+beta[3],beta[2],lwd=2,lty=3) 
legend(700,79,c("Early Start","Late Start"),  
  pch=c(22,21),lwd=2,pt.bg=c("green","orange"),pt.cex=1.7,lty=c(3,2))

detach(case0901)
# }

Run the code above in your browser using DataLab