# R Dataset / Package HistData / ZeaMays

Webform
Category

Webform
Category

Webform
Category

Webform
Category

Webform
Category

Webform
Category

## Visual Summaries

Embed
<iframe src="https://embed.picostat.com/r-dataset-package-histdata-zeamays.html" frameBorder="0" width="100%" height="307px" />
Attachment Size
350 bytes
Documentation

## Darwin's Heights of Cross- and Self-fertilized Zea May Pairs

### Description

Darwin (1876) studied the growth of pairs of zea may (aka corn) seedlings, one produced by cross-fertilization and the other produced by self-fertilization, but otherwise grown under identical conditions. His goal was to demonstrate the greater vigour of the cross-fertilized plants. The data recorded are the final height (inches, to the nearest 1/8th) of the plants in each pair.

In the Design of Experiments, Fisher (1935) used these data to illustrate a paired t-test (well, a one-sample test on the mean difference, cross - self). Later in the book (section 21), he used this data to illustrate an early example of a non-parametric permutation test, treating each paired difference as having (randomly) either a positive or negative sign.

data(ZeaMays)

### Format

A data frame with 15 observations on the following 4 variables.

pair

pair number, a numeric vector

pot

pot, a factor with levels 1 2 3 4

cross

height of cross fertilized plant, a numeric vector

self

height of self fertilized plant, a numeric vector

diff

cross - self for each pair

### Details

In addition to the standard paired t-test, several types of non-parametric tests can be contemplated:

(a) Permutation test, where the values of, say self are permuted and diff=cross - self is calculated for each permutation. There are 15! permutations, but a reasonably large number of random permutations would suffice. But this doesn't take the paired samples into account.

(b) Permutation test based on assigning each abs(diff) a + or - sign, and calculating the mean(diff). There are 2^{15} such possible values. This is essentially what Fisher proposed. The p-value for the test is the proportion of absolute mean differences under such randomization which exceed the observed mean difference.

(c) Wilcoxon signed rank test: tests the hypothesis that the median signed rank of the diff is zero, or that the distribution of diff is symmetric about 0, vs. a location shifted alternative.

### Source

Darwin, C. (1876). The Effect of Cross- and Self-fertilization in the Vegetable Kingdom, 2nd Ed. London: John Murray.

Andrews, D. and Herzberg, A. (1985) Data: a collection of problems from many fields for the student and research worker. New York: Springer. Data retrieved from: https://www.stat.cmu.edu/StatDat/

### References

Fisher, R. A. (1935). The Design of Experiments. London: Oliver & Boyd.

wilcox.test

independence_test in the coin package, a general framework for conditional inference procedures (permutation tests)

### Examples

data(ZeaMays)##################################
## Some preliminary exploration ##
##################################
boxplot(ZeaMays[,c("cross", "self")], ylab="Height (in)", xlab="Fertilization")# examine large individual diff/ces
largediff <- subset(ZeaMays, abs(diff) > 2*sd(abs(diff)))
with(largediff, segments(1, cross, 2, self, col="red"))# plot cross vs. self.  NB: unusual trend and some unusual points
with(ZeaMays, plot(self, cross, pch=16, cex=1.5))
abline(lm(cross ~ self, data=ZeaMays), col="red", lwd=2)# pot effects ?
anova(lm(diff ~ pot, data=ZeaMays))##############################
## Tests of mean difference ##
##############################
# Wilcoxon signed rank test
# signed ranks:
with(ZeaMays, sign(diff) * rank(abs(diff)))
wilcox.test(ZeaMays$cross, ZeaMays$self, conf.int=TRUE, exact=FALSE)# t-tests
with(ZeaMays, t.test(cross, self))
with(ZeaMays, t.test(diff))mean(ZeaMays$diff) # complete permutation distribution of diff, for all 2^15 ways of assigning # one value to cross and the other to self (thx: Bert Gunter) N <- nrow(ZeaMays) allmeans <- as.matrix(expand.grid(as.data.frame( matrix(rep(c(-1,1),N), nr =2)))) %*% abs(ZeaMays$diff) / N# upper-tail p-value
sum(allmeans > mean(ZeaMays$diff)) / 2^N # two-tailed p-value sum(abs(allmeans) > mean(ZeaMays$diff)) / 2^Nhist(allmeans, breaks=64, xlab="Mean difference, cross-self",
main="Histogram of all mean differences")
abline(v=c(1, -1)*mean(ZeaMays$diff), col="red", lwd=2, lty=1:2)plot(density(allmeans), xlab="Mean difference, cross-self", main="Density plot of all mean differences") abline(v=c(1, -1)*mean(ZeaMays$diff), col="red", lwd=2, lty=1:2)
--

Dataset imported from https://www.r-project.org.

Picostat Manual
###### How To Register With a Username
1. Go to the user registration page.
4. Click Submit.
5. Click the link that was sent to the email address you registered with.
6. Clicking the link will open another page on Picostat where you can select a password.
7. Click Save and enter any profile details you wish to enter.
###### How To Register With Google Single Sign On (SSO)
1. Go to the user login page.
5. Google will redirect you back to Picostat with your new account created and you will be logged in.
6. Enter any profile details you wish to share.
1. Go to the user login page.
3. Click "Login". You will be redirected to your user homepage authenticated.
1. Go to the user login page.
3. If you already registered with Picostat via Google SSO, you will be redirected to your user homepage authenticated.
###### How To Import a Dataset
1. Create a Picostat account or login with your existing picostat account (see above).
2. Go to the dataset import page.
3. Select a license for the dataset. The default is "No License" but allows Picostat to host a copy of the dataset as per the privacy policy. You may wish to uncheck the "Public" option if you do not wish to share your dataset with others. R Datasets that come by downloading R have a GNU General Public License v3.0 which may also be selected from the Picostat dropdown.
4. Enter a title for the dataset
5. Choose a dataset input methods. Available options include:
• Random data - this populates your dataset with random numbers between 0 and 100. You can specify the number of rows and columns for the random dataset.
• CSV, TSV or TXT file - you will have the option upload a file within the current file size limit and also specify the header and whether or not the dataset is a contingency table. With contingency tables, the first column becomes a label for the rows. Currently with Picostat, there is limited support for contingency tables. Choose "Yes" to the Header option if the first line of the data contains titles for the rows. Also choose the Separator for the dataset. A separator is what breaks the data up. In some cases, a comma would separate data values in a row. You will also have the option to add documentation in the form keyboarded text and also uploaded documentation attachments. You can also specify a license for the documentation.
• Copy and Paste. This selection contains many of the same fields as importing a file with an additional textarea to copy and paste data to.
• Empty dataset. Start with a blank dataset and manually add data with the Picostat dataset editor.
• Excel file - Choose this option if you would like to convert your Excel spreadsheet to a Picostat dataset. With this selection, you will have the option to specify whether to use the first row in the Excel file as column names. If you would like to choose a specific sheet to use, you can also specify with entering its name in the text input.
• sas7bdat file - SAS is a powerful statistical software package that has its own proprietary file format. Choose this option if you are importing a SAS file.
• SPSS sav file - SPSS is a statistical package owned by IBM. You can import SPSS files by choosing this option.
6. Choose whether or not the dataset contains a header. Some of the dataset input methods allow you to specify whether or not a Header exists on the file. Sometimes dataset files contain a Header as the first row which names the columns. If you choose "Yes" to this, the first row in the dataset will become column headers.
7. You can also add documentation and specify a documentation license. This can be used to help explain your dataset to those unfamiliar with it.
8. Choose whether or not to upload an supporting attachments.
9. Pass the captcha. To prevent spam submissions, Picostat has a captcha which is used to prevent automated submissions by bots.
10. Choose a privacy setting for the dataset. You can also specify whether or not the dataset is Public. If you uncheck this setting, only you and the Picostat administrator will be able to view the dataset.
11. Submit the form. Once the form is validated, you will be redirected to the dataset homepage where you can choose to edit or perform statistical operations on the dataset.
###### How To Perform Statistical Analysis with Picostat
1. Go to any dataset homepage. You can get a full list at the dashboard.
2. Near the top of the page there will be two drop downs. One for analysis and one for education. Here we will choose Analyis. Choose from one of the following:
• Numerical Summaries - Here you can get the:
1. Arithmetic mean
2. Median
3. Quartiles
4. Minimum and Maximum
5. Stem-and-leaf plot
6. Standard deviation and Variance
7. IQR
8. Cumulative frequencies
• Plot - a plot of two columns on the cartesian coordinate system
• Boxplot - a Boxplot (box-and-whisker plot) of a column.
• Correlation Coefficient - Compute the correlation coefficient between two columns.
• Cumulative Frequency Histogram - Display a cumulative frequency histogram
• Dotplot
• Hollow Histogram - Plot two columns on the same histogram with a different color for each column.
• Pie Chart
• Regression - Perform a simple linear regression and compute the p-value and regression line. Also plots the data with the regression line.
• Stem and Leaf Plots - Plot a one or two-sided stem-and-leaf plot from one or two columns respectively.
• Visual Summaries - plots the following:
1. Frequency Histogram
2. Relative Frequency Histogram
3. Cumulative Frequency Histogram
4. Boxplot (Box-and-whisker plot)
5. Dotplot
Recent Queries For This Dataset

No queries made on this dataset yet.

Title Authored on Content type
R Dataset / Package MASS / muscle March 9, 2018 - 1:06 PM Dataset
R Dataset / Package MASS / DDT March 9, 2018 - 1:06 PM Dataset
OpenIntro Statistics Dataset - pm25_2011_durham August 9, 2020 - 2:30 PM Dataset
R Dataset / Package wooldridge / jtrain2 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package DAAG / nsw74psid3 March 9, 2018 - 1:06 PM Dataset