[R] Fitting the negative hypergeometric distribution

2011-08-31 Thread Wilson, Andrew
I'd like to fit the (1-displaced) negative hypergeometric distribution to data samples such as the following:- x <- c(370, 311, 299, 266, 265, 232, 197, 198, 170, 154, 133, 123, 120, 103, 80, 72, 69, 67, 67, 50, 36, 35, 26, 23, 15, 11, 9, 6, 5, 3, 3, 2, 2, 2) i.e., I want to estimate the paramete

[R] Bonnet-Price CI for difference between two medians

2011-02-23 Thread Wilson, Andrew
I was wondering if anyone has produced any "R" code for the Bonnet-Price 95% confidence interval for the difference between two medians? Refs: Price, R.M. & Bonnet, D.G. 2002. Distribution-free confidence intervals for difference and ratio of medians. J. Statist. Comput. Simul. 72(2), 119-124.

[R] Bayes factor for a Welch or Yuen t-test

2010-11-29 Thread Wilson, Andrew
Although I have located a number of solutions for the Student t-test (equal variances), I have been unable to find any code for calculating a Bayes Factor for a Welch (unequal variances) or Yuen (trimmed mean) t-test. I wonder if anyone could help me with this? Many thanks, Andrew Wilson __

[R] Multiple binomial tests on a large table

2010-07-29 Thread Wilson, Andrew
I need to run binomial tests (binom.test) on a large set of data, stored in a table - 600 tests in total. The values of x are stored in a column, as are the values of n. The data for each test are on a separate row. For example: X N 11 19 9 26 13 21 13 27 18 30

[R] Entropy of a Markov chain

2010-07-14 Thread Wilson, Andrew
Does anyone have any "R" code for computing the entropy of a simple first or second order Markov chain, given a transition matrix something like the following (or the symbol vector from which it is computed)? AGRe ARIe CSRe DIRe DSCe eos HRMe SPTe TOB

[R] Mid-P value for a chi-squared test

2010-06-01 Thread Wilson, Andrew
Can anyone tell me how to calculate a mid-p value for a chi-squared test in R? Many thanks, Andrew Wilson __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/postin