ASA Connect

 View Only
Expand all | Collapse all

Nonlinearity and P-values

  • 1.  Nonlinearity and P-values

    Posted 09-08-2021 17:32
    Hi everyone, 

    Recently, I came upon a seemingly simple issue in the context of a Poisson regression model with a log link, but there is one other related issue I am seeking advice on.

    Issue No. 1:  Poisson regression model with a log link

    The Poisson regression model with a log link model has a count response variable y and a predictor variable x, which is log-transformed prior to being included in the model.  If mu denotes the mean value of y at a given x, then mu is modelled as:  

           log(mu) = beta0 + beta1 * log(x)

    After fitting the model, let's say I get estimated values for beta0 and beta1 to be equal to b0 = 0.99, b1 = 0.51 and a really small p-value p for testing the null hypothesis Ho: beta1 is equal to 0 versus Ha: beta1 different from 0, which I will report as p < 0.001. 

    While the relationship between log(mu) and log(x) is linear, that's not what I really care about.  What I really care about is the relationship between mu and x (which involves getting rid of the logs on both sides of the above stated model equation). 

    The graph below shows the linear relationship between the estimated log(mu) and log(x) in the left panel, the relationship between mu and log(x) in the middle panel and the relationship between mu and x in the right panel.  This last panel captures the relationship I really care about.


    For the panel on the left, let's say that I feel comfortable stating that there is a statistically significant relationship between the estimated log(mu) and log(x) (then quote the p-value in brackets after my statement: p < 0.001): 

    1) There is a statistically significant linear relationship between estimated log(mu) and log(x)  (p < 0.001); 

    Ignoring the whole controversy about statistical significance for now, what I want to know is whether the same p-value is applicable to statements like the ones below: 

    2)  There is a statistically significant non-linear relationship between the estimated mu and log(x)  (p < 0.001); 

    3)  There is a statistically significant non-linear relationship between the estimated mu and log(x)  (p < 0.001); 

    If 1), 2) and 3) make sense, does the reverse also hold should p come out to be > 0.05?  In other words, if the estimated linear relationship between log(mu) and log(x) is statistically non-significant, can we claim the same is the case for the other two non-linear relationships and quote the exact same p-value?  

    A variation of this question would refer to a Gaussian regression, where mu = beta0 + beta1*log(X) and the relationship of interest would be the one between mu and X (rather than mu and log(X)). In this setting, could we use the same p-value p when talking about the relationship between mu and log(X) and the relationship between mu and X?  

    Dr. Ben Bolker mentioned on Twitter something about p-values being invariant to monotone transformations but I couldn't find any reference to a result like this and I am also unsure when this result would apply - if we back-transform mu after modelling log(mu)? if we back-transform X after modelling either mu or log(mu) as a function of log(X)?   

    I know we use this type of reasoning in other models too - for example, in binary logistic regression, we find a statistically significant linear relationship between the log odds of an event and X and then we claim that a statistically significant non-linear relationship exists between the probability of an event and X.   

    Ultimately, I don't necessarily want to add p-values to statements about the relationships I really care about (especially if those p-values change their value when they are subjected to transformation) - what I want is to make sure I don't make invalid statements and don't draw inaccurate conclusions.
     
    Issue No. 2:  Gaussian regression with log(X)

    Let's say I have a Gaussian regression model of the form:  mu = beta0 + beta1 * log(X) and then I plot mu against the untransformed X.  What language would you use to describe the resulting model?  It is a non-linear model but I am not sure if it can be described as a back-transformed semi-log model (predictor)? Something better? 

    Similarly for the model log(mu) = beta0 + beta1 * log(X):  If we plot mu versus the untransformed X, what language would you use to describe the resulting model?  Back-transformed double-log model?  Something better?  

    Thanks in advance for your insights and if the answer is obvious, go easy on me.  (: 

    Isabella

    ------------------------------
    Isabella R. Ghement, Ph.D.
    Ghement Statistical Consulting Company Ltd.
    E-mail: isabella@ghement.ca
    Tel: 604-767-1250
    Web: www.ghement.ca
    ------------------------------


  • 2.  RE: Nonlinearity and P-values

    Posted 09-09-2021 09:20
    It's a somewhat contrived example. But suppose the graph formed a near-perfect circle. (Say the y-value was randomly positive or negative to get both half-circles).

    Then there's clearly a relationship. It's a very distinct shape, not an amorphous scatterplot of points. But there is no linear relationship whatsoever.

    I think you will always have to specify the kind of relationship you are looking for to do a model fitting. And there will probably always be a relationship, perhaps a contrived one, which shows up as no relationship under the model you choose.

    ------------------------------
    Jonathan Siegel
    Director Clinical Statistics
    ------------------------------



  • 3.  RE: Nonlinearity and P-values

    Posted 09-09-2021 11:18
    Edited by Christopher Niederer 09-09-2021 11:21
    I performed many of these types of regression analysis in my chemical engineering education both in labs and course work (circa 1980s.)  We were always asked to report the "R-squared" value from our regression analysis.  I wasn't introduced to P-values until business school when I was introduced to hypothesis testing in my  managerial statistics class.

    ------------------------------
    Christopher Niederer
    Managing Principal & Founder
    Hapgood Capital
    ------------------------------



  • 4.  RE: Nonlinearity and P-values

    Posted 09-09-2021 19:18
    Thanks very much, Chris!  Given the ongoing p-value debate, it was a good thing that you stayed away from p-values during your chemical engineering education.  I am still trying to get on the NeoFisherian p-value bandwagon and only recently it dawned on me that one could adopt different p-value philosophies for different projects (or perhaps even within the same project).

    ------------------------------
    Isabella GhementGhement Statistical Consulting Company Ltd.
    ------------------------------



  • 5.  RE: Nonlinearity and P-values

    Posted 09-09-2021 13:05

    Hi Isabella, hope you're well. A couple of thoughts:

    1. Even in OLS regression, a test for B1 for the model Y = B0 + B1*X will generally yield a different p-value than for Y = B0 + B1*log(X) or log(Y) = B0 + B1*X. So non-linear transformations of variables in the model, even if monotonic, generally yield different p-values.

    2. The p-value depends on the hypothesized null model, which includes not only the value of beta1 under H0 but also the specifics of the chosen model and statistical test. In practice, modeling a non-linearly transformed explanatory and/or outcome variable (e.g., to get at the associations of interest in your problem) would generally require a different model, and thus yield a different p-value for that reason alone.

    Others can correct me if I'm missing something. (:

    Cheers,

    Vince   



    ------------------------------
    Vincent Staggs, PhD
    Director, Biostatistics & Epidemiology Core, Children's Mercy Research Institute;
    Associate Professor, School of Medicine, University of Missouri-Kansas City
    ------------------------------



  • 6.  RE: Nonlinearity and P-values

    Posted 09-09-2021 19:15
    Thanks so much for your thoughts, Vince!  I am doing well and hope that you are doing the same too.  

    After reading your point 2. with a Poisson regression setting in mind, I wrote down my model and testing hypotheses: 

    Model:  log(mu) = beta0 + beta1* X 

    Ho:       beta1 = 0 
    Ha:       beta1 ≠ 0  

    and then re-expressed the two hypotheses as follows: 

    Ho:       log(mu) =  beta0                          (i.e., log(mu) is constant)
    Ha:       log(mu) =  beta0 + beta1* X        (i.e., log(mu) is a linear function of X)

    I then applied the exp() transformations to both sides of the last set of hypottheses:

    Ho:       mu =  exp(beta0)                          (i.e., mu is constant)
    Ha:       mu =  exp(beta0 + beta1* X)        (i.e., mu is an exponential function of X)

    In this Poisson regression setting, it seems to me that all 3 hypotheses are equivalent.  So if we get a p-value for testing the first set of hypotheses, we can quote that same p-value for testing the last set of hypotheses.  However, as per your point 2., we would have to carefully describe that the third set of hypotheses looks into whether or not the untransformed mu is an exponential function of X.  The second set (as well as the first) looks at whether or not the log transformed mu is an exponential function of X.  

    Is my reasoning above correct? Or am I making unsubstantiated equivalence claims?

    Sticking with the Poisson regression context, things get trickier if the model uses log(X) instead of just X:

    Model:  log(mu) = beta0 + beta1* log(X) 

    Ho:       beta1 = 0 
    Ha:       beta1 ≠ 0  

    Assuming my reasoning above holds, we can re-express the above hypotheses as:

    Ho:       mu =  exp(beta0)                          (i.e., mu is constant)
    Ha:       mu =  exp(beta0 + beta1* log(X))        (i.e., mu is an exponential function of log(X))

    If the p-value for testing whether or not beta1 is ≠ 0  in the Poisson regression model that uses log(X) is small, we can claim (?) both that the data are compatible with a linear relationship between log(mu) and log(X) AND that the data are compatible with mu being an exponential function of a  linear function of log(X).  (Not sure what the best wording to describe this relationship would be.) 

    But it seems that we can't go further than that and make claims about the relationship between mu and X itself?  

    Please let me know if I am on the right track or not.

    Thanks so much! 

    Isabella 



    ------------------------------
    IsabellaGhementGhement Statistical Consulting Company Ltd.
    ------------------------------



  • 7.  RE: Nonlinearity and P-values

    Posted 09-09-2021 20:24

    Hi Isabella, I'm with you on this taking some time to think through. I think I may have misunderstood your question, need to think more about this when my brain is fresh. (:

    Vince

      



    ------------------------------
    Vincent Staggs, PhD
    Director, Biostatistics & Epidemiology Core, Children's Mercy Research Institute;
    Professor, School of Medicine, University of Missouri-Kansas City
    ------------------------------



  • 8.  RE: Nonlinearity and P-values

    Posted 09-09-2021 13:50
    From a multiplicity-control perspective, as long as you specify which model in advance of your hypothesis test you are using, that p-value can be reported as "statistically significant" at the alpha-level you prespecify.  So if your interest is in the linear relationship between the back-transformed x and y, you would report that p-value, and the other two scenarios can still be discussed, but the p-values would be descriptive in nature.  You could get fancy and pre-specify the other two scenarios and control for multiplicity using a step-doen or other strong-control procedure (such as Bonferroni) while accounting for the expected high correlation between the three models, since you are using the same dataset, but this may be more that what its worth.  Hoping others can chime in but I think this could be a reasonable approach.

    ------------------------------
    Davis Gates
    Merck & Co., Inc.
    ------------------------------



  • 9.  RE: Nonlinearity and P-values

    Posted 09-09-2021 19:21
    Thanks, Davis!  You raise an interesting point (but also see my answer to Dr. Vince Staggs in this same thread) and one that I hadn't initially considered.  This is certainly one of those problems where there are multiple layers of understanding to go through before some light emerges at the end of the tunnel (at least for me).

    ------------------------------
    Isabella GhementGhement Statistical Consulting Company Ltd.
    ------------------------------



  • 10.  RE: Nonlinearity and P-values

    Posted 09-10-2021 07:24
    Isabella, I'm genuinely curious, why do an analysis that yields a p-value at all? Being able to be pretty certain that "Beta1 is not 0" doesn't seem as nearly useful as being able to report credible intervals for Beta0 and Beta1 that in this case a very simple Bayesian analysis would yield?

    You could also directly fit mu = exp(Beta0) * x ^ Beta1 directly, (hope I got that transform right ;-) though you might need to have reasonable bounds on the prior for Beta1 to avoid infinities.

    ------------------------------
    Tom Parke
    ------------------------------



  • 11.  RE: Nonlinearity and P-values

    Posted 09-10-2021 15:49
    Is this an acceptable answer:  Because the client wants such an analysis despite my protestations to the contrary?   (:

    ------------------------------
    Isabella GhementGhement Statistical Consulting Company Ltd.
    ------------------------------



  • 12.  RE: Nonlinearity and P-values

    Posted 09-10-2021 18:32
    Sadly that still has to be an acceptable answer.
    Oh the re-education, will it never be over ;-)

    ------------------------------
    Tom Parke
    ------------------------------



  • 13.  RE: Nonlinearity and P-values

    Posted 09-11-2021 01:00

    Dear Isabella:

    IMO it seems simple but it's a bit tricky.

    I think the technically correct statement is:
    (1) Assuming a linear relationship between log(mu) and log(x), the slope is non-zero.
    The linearity is an assumption. The stat inference is on its magnitude.
    And if you assume linearity for log(mu)~log(x), this is equivalent to assuming non-linearity on those other scales (2) and (3). But that comes by assumption, not the stat inference.

    So, I don't think you can make an inferential statement on the form of the relationship, ie, I don't think the test of the slope is relevant to this.

    To see this, a non-zero slope may occur even if the relationship is actually non-linear (in which case, it could be linear in some other scale). For example:
    (i) generate linear data with log(mu)~x
    (ii) fit log(mu)~log(x) and estimate/test the slope 
    The slope in (ii) can be non-zero and significant (with enough data), but the actual form is non-linear for log(mu)~log(x) and linear for log(mu)~x!

    To make inference on the form of the relationship, in practice, we might fit a more complex non-linear model (say, polynomial, or spline, or some smoother) and compare it to the simpler linear model. In practice, if the improvement in fit is not significant (through appropriate statistical testing or likelihood-based AIC or other such criterion), we might conclude that the relationship is (sufficiently) linear. If you have sufficient power for this, this is semi-reasonable.

    Technically, though, failing to reject the linearity null does not prove it. Strictly speaking, in order to prove it, we would need to show that the non-linear part is small/trivial, so it becomes an equivalence-type inference setup. The problem is that it's not easy to specify an equivalence 'margin' for a quadratic term (what is 'small'/'trivial'?), let alone do that for a spline or non-parametric smoother.

    Best,
    Constantine


    ------------------------------
    Constantine Daskalakis, ScD
    Thomas Jefferson University, Philadelphia, PA
    ------------------------------