0
$\begingroup$

I'm currently using lme4 to fit the following model:

Model = lmer(CA ~ P + T + S + (1 | Study), Data)

P and T refer to pressure and temperature, and there is an a priori reason to expect a different relationship at low pressure and temperature compared to high pressure and temperature. So I've partitioned my data into two, one for supercritical CO2 conditions (P > 7.37 and T > 31.1) and one for everything else. Which means having two models...

ModelSub = lmer(CA ~ P + T + S + (1 | Study), DataSub)
ModelSuper = lmer(CA ~ P + T + S + (1 | Study), DataSuper)

I'm wondering, though, if there is a way to have a single model but include the 'phase' category somehow (Sub versus Supercritical) that doesn't introduce problems, and even if a single model would make it more difficult to interpret the results (at the model the results are easy to interpret because the estimates for T and S are very close across both models)?

Neither of these yielded what I expected...

ModelCombined = lmer(CA ~ P*Phase + T + S + (1|Study),Data)
ModelCombined = lmer(CA ~ P:Phase + T + S + (1|Study),Data)

In the second version (P:Phase) the T and S estimates were okay but the P:Phase estimates were the same for both categories whereas there is a marked difference when separate models are made...

$\endgroup$
3
  • $\begingroup$ I'm a bit confused about your setup. Why would the sets $\left\{ P < 7.37, T < 31.1\right\}$ and $\left\{ P \geq 7.37, T \geq 31.1\right\}$ partition your data into two? What about $\left\{ P \geq 7.37, T < 31.1\right\}$, etc. $\endgroup$
    – Andrew M
    Commented Feb 24, 2015 at 8:20
  • $\begingroup$ Sorry, you're correct. I've updated the original post. The partitioning is {P≥7.37,T≥31.1} and everything else - Data$Phase <- factor(ifelse((Data$P>7.37) & (Data$T > 31), "Supercritical" , "Subcritical")) $\endgroup$
    – lithic
    Commented Feb 24, 2015 at 9:09
  • 1
    $\begingroup$ could you provide some example data? I don't see why your last model would necessarily give the same result for both phases. In short, you can include the phase variable in all kinds of ways, are any of the warranted based on subject knowledge? $\endgroup$
    – swmo
    Commented Feb 24, 2015 at 10:19

1 Answer 1

1
$\begingroup$

Since you say :

P and T refer to pressure and temperature, and there is an a priori reason to expect a different relationship at low pressure and temperature compared to high pressure and temperature. So I've partitioned my data into two, one for supercritical CO2 conditions (P > 7.37 and T > 31.1) and one for everything else. Which means having two models...

No, I don't think it means that. Since you expect a different relationship at low pressure and temperature compared to high pressure and temperature, you can fit an interaction term to account for this:

ModelCombined = lmer(CA ~ P + T + P:T + S + (1|Study),Data)
$\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.