[R-sig-eco] confidence intervals smatr package

David Warton david.warton at unsw.edu.au
Tue Feb 24 23:17:47 CET 2015


Hi Sonia,
So I assume you are talking about confidence intervals for a common slope across several samples, and how sometimes they don't seem to correspond to tests that the common slope equals some value b.  Note though that there is no such inconsistency for single sample CIs and tests - in that case there is exact equivalence.

So I don't actually think there is a problem with the common slope CI nor the test, I think what is going on is that they are doing slightly different things.  When you have several samples and a particular value b in mind for the slope, there are three hypotheses of interest:
Hbcom: all slopes = b
Hcom: all slopes are equal (but not necessarily to the value b)
Hdiff: not all slopes are equal

The common slope confidence intervals are constructed by inverting the likelihood ratio test of Hcomb vs Hcom, in other words, it finds a set of plausible values for a common slope b, assuming that there is in fact a common slope in the first place.  But the slope.test=b argument, when used for several samples, tests Hcomb against Hdiff - so it tests if there is a common slope AND it is equal to b.  As compared to the common slope CI, this will give quite a different result when there is evidence against Hcom, because in that case you could get a significant P-value for any choice of b.

Maybe we should change the output in smatr to make this clearer - or indeed we could change the way we test if the common slope is b...
All the best
David

 
David Warton
Professor and Australian Research Council Future Fellow
School of Mathematics and Statistics and the Evolution & Ecology Research Centre
The University of New South Wales NSW 2052 AUSTRALIA
phone (61)(2) 9385-7031
fax (61)(2) 9385-7123
 
http://www.eco-stats.unsw.edu.au/




----------------------------------------------------------------------

Date: Tue, 24 Feb 2015 11:18:44 +0100
From: Sonia Romero <soniarom115 at gmail.com>
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] confidence intervals smatr package
Message-ID:
	<CAETa6N0doV7_Dudi4=LV9C9CQwN2Z=2dB=XDE2R2WR0BMyKN-w at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,
I am a user of the Package smatr. I have a doubt about the upper and lower limits reported for the slopes. Are they 95% confidence intervals? When I use "slope.test=x", being x a value comprised between those lower and upper limits, the p-value obtained is lower than 0.05. Therefore, the confidence intervals and the p-value of the slope test seem contradictory.

The case is as follows:
m <- sma (log_A ~ log_C + group, slope.test = 1,   data = d)

Thanks in advance.

	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list