title: Jaccard cluster confidence interval
body: <p>I am hoping someone will give me advice on how to get confidence intervals from a Jaccard cluster using R.  I have species data from the 1970's and from today at four sites. When I run the following code I get a great graph that shows that one of my present day sites is closer to the historical than another site. I'm sure people are going to ask about significance. I've seen similar confidence intervals on phylogenetic trees but I'm not sure how to get these kind of results.  I assume I do this with a bootstrap test but I'm not sure how to get results from boot() or how to put them on my cluster graph. Any advice would be greatly appreciated. </p>
  
  <p>My code to make the cluster:</p>
  
  <pre><code>historicalwo &lt;-read.csv("/users/Victoria/Desktop/Stat Documents/historicalwo.csv", 
  row.names =   1)
  
   jaccard2 &lt;- vegdist (historical, method = "jaccard")
  
   plot (hclust (jaccard2), hang = -1,main = "Sites clustered by Jaccard similarity",axes = FALSE,
   ylab = "")
  </code></pre>
  
  <p>then I made a .csv of the jaccard results with 3 columns, site 1, site 2 and the jaccard index of the two sites.</p>
  
  <p>jaccardboot &lt;-read.csv("/users/Victoria/Desktop/Stat Documents/jaccardboot.csv", header = TRUE)</p>
  
  <pre><code>bs &lt;- function(formula, data, indices) {
  d &lt;- data[indices,] 
  fit &lt;- lm(formula, data=d)
  return(coef(fit)) } 
  
  results &lt;- boot(data=jaccardboot,statistic=bs,
              R=100, formula=site1~jaccard+site2)
  </code></pre>
  
  <p>results</p>
  
  <p>I get:
  Error in boot(data = jaccardboot, statistic = bs, R = 100, formula = site1 ~  : 
    number of items to replace is not a multiple of replacement length
  In addition: There were 50 or more warnings (use warnings() to see the first 50)</p>