Choosing a test

Place this file in the folder with your data. Write the names of your own data file below instead of the one shown.

Then just compile the script with R studio.

StatsExpert.R will implement the flow chart shown below with your data and select the appropriate option for you.

d <- read.csv("example3.csv")  ## Put your own file name here
source("StatsExpert.R")

Your data look like this
<!– html table generated in R 2.15.1 by xtable 1.5-6 package –>

sites observations
1 Site 1 Present
2 Site 1 Absent
3 Site 1 Present
4 Site 1 Absent
5 Site 1 Absent
6 Site 2 Absent

There are a total of 2 columns of data.
Your first column is a categorical variable called sites
Your second column is a categorical variable called observations
Because you have two categorial variables you should consider carrying out cross tabulation and Chi squared tests of association
You should think about how many levels of each category you have. If there are many levels you may have made a mistake when designing the study or formatting the data.