The CO2 data frame has 84 rows and 5 columns of data from an
experiment on the cold tolerance of the grass species
Echinochloa crus-galli.
Usage
CO2
Format
This data frame contains the following columns:
Plant
an factor giving a unique identifier for each plant.
Type
a factor with levels
QuebecMississippi
giving the origin of the plant
Treatment
a factor with levels
nonchilledchilled
conc
a numeric vector of ambient carbon dioxide concentrations (mL/L).
uptake
a numeric vector of carbon dioxide uptake rates
(umol/m^2 sec).
Details
The CO2 uptake of six plants from Quebec and six plants
from Mississippi was measured at several levels of ambient
CO2 concentration. Half the plants of each type were
chilled overnight before the experiment was conducted.
Source
Potvin, C., Lechowicz, M. J. and Tardif, S. (1990)
“The statistical analysis of ecophysiological response curves
obtained from experiments involving repeated measures”, Ecology,
71, 1389–1400.
Pinheiro, J. C. and Bates, D. M. (2000)
Mixed-effects Models in S and S-PLUS, Springer.
Examples
require(stats); require(graphics)
coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
## fit the data for the first plant
fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
data = CO2, subset = Plant == 'Qn1')
summary(fm1)
## fit each plant separately
fmlist <- list()
for (pp in levels(CO2$Plant)) {
fmlist[[pp]] <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
data = CO2, subset = Plant == pp)
}
## check the coefficients by plant
sapply(fmlist, coef)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(MEMSS)
Loading required package: lme4
Loading required package: Matrix
Attaching package: 'MEMSS'
The following objects are masked from 'package:datasets':
CO2, Orange, Theoph
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MEMSS/CO2.Rd_%03d_medium.png", width=480, height=480)
> ### Name: CO2
> ### Title: Carbon Dioxide uptake in grass plants
> ### Aliases: CO2
> ### Keywords: datasets
>
> ### ** Examples
>
> require(stats); require(graphics)
> coplot(uptake ~ conc | Plant, data = CO2, show.given = FALSE, type = "b")
> ## fit the data for the first plant
> fm1 <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
+ data = CO2, subset = Plant == 'Qn1')
> summary(fm1)
Formula: uptake ~ SSasymp(conc, Asym, lrc, c0)
Parameters:
Estimate Std. Error t value Pr(>|t|)
Asym 38.1398 0.9164 41.620 1.99e-06 ***
lrc -34.2766 18.9661 -1.807 0.145
c0 -4.3806 0.2042 -21.457 2.79e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 1.663 on 4 degrees of freedom
Number of iterations to convergence: 0
Achieved convergence tolerance: 1.663e-06
> ## fit each plant separately
> fmlist <- list()
> for (pp in levels(CO2$Plant)) {
+ fmlist[[pp]] <- nls(uptake ~ SSasymp(conc, Asym, lrc, c0),
+ data = CO2, subset = Plant == pp)
+ }
> ## check the coefficients by plant
> sapply(fmlist, coef)
Mc1 Mc2 Mc3 Mn1 Mn2 Mn3 Qc1
Asym 21.787232 13.555203 18.535062 34.084807 32.128265 28.482853 36.428732
lrc 2.448758 -1.982271 -136.114730 -8.813218 -29.044263 -17.370807 -9.901194
c0 -5.142256 -4.560851 -3.465158 -5.064579 -4.466157 -4.591566 -4.861741
Qc2 Qc3 Qn1 Qn2 Qn3
Asym 39.819497 40.683704 38.139782 42.871686 44.227996
lrc -51.534564 -11.541640 -34.276585 -29.656171 -37.626788
c0 -4.463838 -4.945218 -4.380647 -4.665728 -4.486118
>
>
>
>
>
> dev.off()
null device
1
>