# 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
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.34675687551498413, "perplexity": 1227.5727912577006}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.3, "absolute_threshold": 10, "end_threshold": 5, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-49/segments/1637964358118.13/warc/CC-MAIN-20211127043716-20211127073716-00582.warc.gz"}