0
$\begingroup$

I ran an experiment varying the temperature and the quantity of chemicals added for the removal of 4 contaminants (A, B, C and D). The data obtained from this experiment was (in R):

temperature <- c(rep(20,4),rep(30,4),rep(40,4))
chemicals <- rep(seq(0,30,10),3)
contaminant_A <- c(9,22,25,28,35,50,57,78,86,94,97,100)
contaminant_B <- c(0, 0, 3, 3, 4, 5,11,11,13,18,18,21)
contaminant_C <- c(68,57,53,50,44,38,36,34,31,29,25,24)
contaminant_D <- c(39,68,35,32,53,69,69,60,35,30,43,36)

DF <- data.frame(temperature,
                 chemicals,
                 contaminant_A,
                 contaminant_B,
                 contaminant_C,
                 contaminant_D)

enter image description here

I'd like to use a statistical test (or some statistical tests) to answer questions like:

  • Is the temperature or the quantity of chemicals the most relevant variable of the process?
  • Are the removals of the contaminants related?

I was thinking of using a PCA, however I'm not sure.

If there is a graphical way to explain it, that would be great.

EDIT 1:

As Izy suggested, I used the GLM for all contaminats:

> glm(contaminant_A~temperature+chemicals)

Call:  glm(formula = contaminant_A ~ temperature + chemicals)

Coefficients:
(Intercept)  temperature    chemicals  
   -65.1750       3.6625       0.8033  

Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
Null Deviance:      12030 
Residual Deviance: 327.1    AIC: 81.72
> glm(contaminant_B~temperature+chemicals)

Call:  glm(formula = contaminant_B ~ temperature + chemicals)

Coefficients:
(Intercept)  temperature    chemicals  
     -18.23         0.80         0.21  

Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
Null Deviance:      604.9 
Residual Deviance: 26.77    AIC: 51.68
> glm(contaminant_C~temperature+chemicals)

Call:  glm(formula = contaminant_C ~ temperature + chemicals)

Coefficients:
(Intercept)  temperature    chemicals  
    91.1250      -1.4875      -0.3833  

Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
Null Deviance:      2090 
Residual Deviance: 99.71    AIC: 67.46
> glm(contaminant_D~temperature+chemicals)

Call:  glm(formula = contaminant_D ~ temperature + chemicals)

Coefficients:
(Intercept)  temperature    chemicals  
   59.51667     -0.37500     -0.05667  

Degrees of Freedom: 11 Total (i.e. Null);  9 Residual
Null Deviance:      2615 
Residual Deviance: 2498     AIC: 106.1

Using contaminant A as example, can I say that the temperature is more relevant than the quantity of chemicals because the coefficient is bigger? What value of these results informs about the relation like a R^2?

$\endgroup$
5
  • $\begingroup$ Have you considered a general linear model (glm family in R)? e.g. glm(contaminant~temperature+chemicals). Do you expect any interaction between the effect of temperature and the effect of quantity of chemicals? Your knowledge here may be able to inform what subset of possible tests/models you might want to use. For your second question, have you checked if the removal of various contaminants is correlated, as a starting point? $\endgroup$
    – Izy
    Commented Jun 24, 2019 at 22:17
  • 2
    $\begingroup$ PCA $\ne$ statistical test. (And much of what I have seen published which attempts to incorporate tests into PCA is rife with violations of the i.i.d. assumption.) $\endgroup$
    – Alexis
    Commented Jun 24, 2019 at 22:20
  • $\begingroup$ @Izy first, the expected was that the increase of the temperature improve the removal, but the data didn't show this. I uses de GLM for the contaminants (look at the original question EDIT) $\endgroup$ Commented Jun 25, 2019 at 0:31
  • 1
    $\begingroup$ I will only suggest that you use some numerical and graphical methods to get an idea which variables are associated with which others. I tried a couple of things with functions in the base of R. At first glance, it seems that regression methods may be useful. I will use Answer format to show a couple of things I tried. I don't understand the intended role of Chem, so I didn't use it. $\endgroup$
    – BruceET
    Commented Jun 25, 2019 at 1:31
  • $\begingroup$ There is no conclusion that numbers/methods give you that you can't put meaningfully into a plot. This is because there are 5 ways to rephrase a mathematical idea: formulae, tables, figure/graph, words, and flowchart/graph. It is immensely valuable to double-check every conclusion you get to by plotting it. My old retired core-comp mgr used to call them "GRC's" or Gross Reality Checks. $\endgroup$ Commented Jun 27, 2019 at 18:16

1 Answer 1

1
$\begingroup$

Not an Answer. Continuation of comment:

MAT = cbind(Temp, a, b, c, d)
cor(MAT)
           Temp          a          b           c           d
Temp  1.0000000  0.9446208  0.9199987 -0.92024370 -0.20741843
a     0.9446208  1.0000000  0.9705441 -0.95711450 -0.20573950
b     0.9199987  0.9705441  1.0000000 -0.92154735 -0.29544696
c    -0.9202437 -0.9571145 -0.9215473  1.00000000  0.07196594
d    -0.2074184 -0.2057395 -0.2954470  0.07196594  1.00000000

It seems that d isn't significantly correlated with anything else. I think you are right that a graphical approach may be helpful, at least at the start. As suggested by correlations near $\pm 1$ above, it seems there are some nearly linear relationships.

pairs(MAT)

enter image description here

Maybe based on some of this, you will want to clarify your experiment and its goals by editing your Question (not with Comments which may be missed). Meanwhile, I will let someone who isn't booked up for the evening make suggestions for interpreting your regression and perhaps trying additional regression models.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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