# Are slopes of calibration experiment different?

I'm running a calibration experiment for an instrument that measures soil moisture content. I have 6 buckets filled with different soils that I weigh daily and at the same time take a measurement with the soil moisture probe.

I now have 6 different XY linear models all with different slopes/intercepts/R2 etc. and want to test to see if the slopes for the different buckets are different.

To be clear, and I think the reason other answers aren't appropriate, is that n = 1, as each bucket represents a different soil type (sand, clay, silt, mixes of those for the other threee); however, the calibration curves have ~18 points each (18 different moisture contents and their corresponding instrument measurement).

I've been using R, so my data are in 12 columns AX, AY, BX, BY, ... FX, FY and would appreciate the code to run the test as well. (A = sample A (sand), B = clay etc. with X and Y being moisture content and probe reading, respectively, taken at that same time (e.g., AX is moisture content for sand)). Moisture contents are different between A to F (i.e., not the same value at each weighing time).

Thoughts?

• Could you please edit your question to clarify your objective? It seems that you might be trying to obtain a different response curve for the instrument for six different soil types, but the role of time in your data collection is not at all clear and makes one wonder what your interest in that variable might be.
– whuber
Apr 28 '14 at 21:06
• Sorry for the delay - the change in moisture content is, I believe, just an artifact of the time. The time is irrelevant (it's just that it takes time to dry the samples out). The plot is y vs. x with y = instrument reading of moisture content vs. x = actual moisture content determined by weighing. Is that more clear? May 4 '14 at 0:53

How about analysis of covariance, factor A runs through 6 soil types, numeric covariate is time. The interaction term will tell you if the slopes are different:

nt <- 10   # length of time series
factorA <- c(rep('A',nt), rep('B',nt), rep('C',nt))
time <- rep(1:nt,3)
n <- length(time)
meant <- mean(1:nt)
time0 <- time[1:nt] - meant      # centered time, I will make the means all equal to 0
Y <- c(time0*1 + 9, time0*1 - 4, time0*1 + 3) + rnorm(n)*0.4
# can also use different slopes
fcA <- as.factor(factorA)

lm1 <- lm(Y ~ fcA + time + fcA*time)
anova(lm1)

• In a calibration context, "slope" typically refers to the relationship between the instrument's response and the known (or more accurately measured) value to which it is responding. Your code seems to interpret "slope" differently in terms of a change over time. To avoid possible misunderstandings, your answer should explain what the code is doing and why you think it is relevant to the question.
– whuber
Apr 28 '14 at 21:04