Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I have a set of data I ran on a simulation using R with a population size (N) of 1000, sample mean of 64.93, and a standard deviation of 27.61. The distribution is positively skewed and a Wilks-Shapiro test done in JMP shows that the data is not normally distributed. I need the confidence intervals of this data to be able to test some experimental data I have.

I have learned that using the boot.ci() function in R can give me confidence intervals using bootstrapping.

As shown in http://www.statmethods.net/advstats/bootstrapping.html, the boot function requires: bootobject <- boot(data= , statistic= , R=), where data is the data of interest, statistic is a function that produces the statistic to be bootstrapped, and R is the number of times to do it.

My data is simply a vector of 1000 samples. I am not sure what statistic I should do. All the examples I have read online require two data sets to make a correlation statistic or a linear regression statistic.

The data can be downloaded from: http://ktdllc.com/data/simp2.csv

Any help on this issue would be greatly appreciated.

share|improve this question
3  
What exactly do you want confidence intervals for? For the estimate of the mean of your data? What do you want to be able to test about 'some experimental data you have'? – Nick Sabbe Nov 15 '11 at 11:00
1  
I don't think you necessarily need to try a bootstrap confidence interval. Tests of Normality will say the data come from a non-Normal distribution often when your CI method is robust to that assumption. You have a large sample size, meaning a CI based on the t distribution will be fairly unaffected by any non-Normality. – Firefeather Nov 15 '11 at 14:05
@Firefeather is quite right. A subtler problem is that comparing experimental data to confidence intervals is usually not valid; at best, it may be valid but is inferior to more standard comparisons of the experimental data to the simulation. In effect, you do have two data sets: the experimental results and the simulated results. – whuber Nov 15 '11 at 15:19
I am testing for copy number differences of genes in an organism. I have experimental data where I take a single organism from a sample when it enters exponential population growth phase and put it into new media. I do a single cell each transfer to reduce any chance of selection occurring. I quantified the DNA at the start of the experiment. Then again after 6 months (~200 generations). – Kevin Nov 15 '11 at 16:18
I did a simulation that matched my experiment and the model for what controls the copy number of the genes between cell division. I want to find the confidence intervals of my simulation so that I can use them to determine if my experimental data fall within or outside my confidence intervals. I have 2 simulations that show a positively skewed distribution that the Wilks-Shapiro shows is non-normal. I also have 2 simulations that are normally distributed. If comparing the confidence intervals of my experimental data to my simulation data is not valid enough, what do you suggest I do instead – Kevin Nov 15 '11 at 16:21
show 1 more comment

1 Answer

If you want to just do a simple bootstrap of a median CI then all you need is a median function that accepts indices.

med <- function(y, indices) median(y[indices])

Then you can just...

b <- boot(dat, med, 1000)
boot.ci(b)

(you might want to plot(b) to examine your boostrap)

share|improve this answer
Thanks I will give this a try – Kevin Nov 15 '11 at 16:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.