Function Posted October 25, 2018 Posted October 25, 2018 Hello everyone For my thesis, I'd like to log transform a variable that represents a certain angle between 2 peaks on a curve. The problem, of course, is that this angle can be negative. As no angle is smaller than -90°, would it be allowed to add 90° to all angles, and log transform the results into a new log-transformed variable? Thanks F
taeto Posted October 25, 2018 Posted October 25, 2018 (edited) 1 hour ago, Function said: For my thesis, I'd like to log transform a variable that represents a certain angle between 2 peaks on a curve. The problem, of course, is that this angle can be negative. As no angle is smaller than -90°, would it be allowed to add 90° to all angles, and log transform the results into a new log-transformed variable? What does it mean to "log transform a variable" the way you use the expression? Reference, if possible. If negativity is a problem, then why can you not use that -90 degrees is the same as +270 degrees? Why can no angle be smaller than -90, i.e. \( -\pi/4\). What would be wrong with an angle of -135 degrees? Edited October 25, 2018 by taeto
Function Posted October 25, 2018 Author Posted October 25, 2018 (edited) Because that's how I defined my angle. It's always defined as the angle the line (or, if you like, vector) from the first to the second peak makes with a horizontal line. I wouldn't have liked working with (360° - (negative angle value)) to substitute the negative angles, as then I would have to conclude that the second situation would have a larger angle, which, according to the definition I gave to that angle, is absolutely not the case. The sign of the angle is inherently correlated with the characteristic of both peaks relative to one another (first peak higher, or second peak higher). The constant arrangement of both peaks on the horizontal axis made me define the angle to be indisputably either greater than -90°, or smaller than 90°. "Log transform a variable" is performing a natural Briggsian logarithm on all its values, and saving the results as values of a new variable. Edited October 25, 2018 by Function
taeto Posted October 25, 2018 Posted October 25, 2018 43 minutes ago, Function said: "Log transform a variable" is performing a natural Briggsian logarithm on all its values, and saving the results as values of a new variable. Okay, nice pics. A Briggsian logarithm has base 10, but the base doesn't really matter here. Why do you want to transform the slope between peaks by a logarithm, does that have any meaning at all? If two different peaks have the same height, why would it make sense to equate that to a disaster, since the logarithm of zero is undefined. And when peaks get very close in height, the logarithm of their difference in height decreases to minus infinity. Your logarithmic transformation does not seem to make sense.
Function Posted October 25, 2018 Author Posted October 25, 2018 Log and square root transformations are common transformations in statistics for variables that are nonnormally distributed, hoping to achieve normality in their log- or root-transformed variants. Which I got. IBM argues that it is possible to "add a constant big enough" to all values, such that no value is negative or zero, and then apply log transformation. An advantage to this method would be that simply adding a constant to each value does not alter variance amongst variable values. The situations you present are highly unlikely. We're talking about proton NMR spectroscopy of some in vivo metabolites. Achieving the situations you suggest are nearly impossible, as the peaks themselves will just stay where they are, and only chance in amplitude, not in frequency/chemical shift, which is displayed on the horizontal axis.
Prometheus Posted October 26, 2018 Posted October 26, 2018 What information is contained in the angle between two peaks? What's the reason for not looking at the entire spectrum? Could you not just measure the angle such that your protractor, so to speak, is aligned vertically, so that 2 peaks of the same height measure 90 instead of 0? This way all your angles will be bound between 0 - 180. I don't know much about it but you need to be careful with the statistical distribution of angles. There's the so called mad machine gunner distribution (p33), where even though a gunner fires uniformly randomly at a line from a fixed spot, the bullets will form a Cauchy distribution, which is not nice to work with as it has no defined moments. I did once stumble across the Watson-Williams test (P b9) which is designed for comparing angles, but i know nothing about it so not sure if it suits your data.. Might be simplest just to stick to a non-parametric test.
Function Posted October 26, 2018 Author Posted October 26, 2018 5 minutes ago, Prometheus said: What information is contained in the angle between two peaks? What's the reason for not looking at the entire spectrum? Could you not just measure the angle such that your protractor, so to speak, is aligned vertically, so that 2 peaks of the same height measure 90 instead of 0? This way all your angles will be bound between 0 - 180. Might be simplest just to stick to a non-parametric test. I am looking at the entire spectrum, but certain frequency peaks represent very distinct metabolites. Change in protractor direction, would that actually not be exactly the same as adding 90 degs to every measured angle post hoc? And that’s the stupid part: a nonparametrical comparison of the original angles does not differ significantly between 2 groups, whereas the Briggs log of the angles + 90 degs does. And as my thesis actially focusses on tumour group classifications, I wouldn’t just consider this as a methodology designed “just to find something significant at one point”, but as a methodology to find and describe class predictors. First step in such process is assessing differences in parameter distributions between both groups ...
Prometheus Posted October 26, 2018 Posted October 26, 2018 9 minutes ago, Function said: Change in protractor direction, would that actually not be exactly the same as adding 90 degs to every measured angle post hoc? True. 9 minutes ago, Function said: And that’s the stupid part: a nonparametrical comparison of the original angles does not differ significantly between 2 groups, whereas the Briggs log of the angles + 90 degs does. And as my thesis actially focusses on tumour group classifications, I wouldn’t just consider this as a methodology designed “just to find something significant at one point”, but as a methodology to find and describe class predictors. First step in such process is assessing differences in parameter distributions between both groups ... That's quite possible, non-parametric tests generally have less power meaning you are more likely to erroneously accept the null hypothesis. Is there a difference between groups when considering the entire spectrum? Is there any existing literature out there looking at the similar things?
Function Posted October 26, 2018 Author Posted October 26, 2018 (edited) 10 minutes ago, Prometheus said: True. That's quite possible, non-parametric tests generally have less power meaning you are more likely to erroneously accept the null hypothesis. Is there a difference between groups when considering the entire spectrum? Is there any existing literature out there looking at the similar things? There are differences in other parameters within comparisons of other groups, but for this one group–group comparison, only this variable differs significantly. I already implemented everything that’s usually used as parameters in MR spectro in human brains, but thought of ‘designing’ new parameters. Edit: after all, I aimed not only to confirm what is already known, but to develop some more unusual variables, as we are in search for optimisation of noninvasive diagnostic methods in tumour assessment Edited October 26, 2018 by Function
Prometheus Posted October 26, 2018 Posted October 26, 2018 1 hour ago, Function said: There are differences in other parameters within comparisons of other groups, but for this one group–group comparison, only this variable differs significantly. Does that mean you have been performing multiple hypothesis tests on various peaks? Did you correct for type 1 error inflation, it might be that the finding is erroneous. 1 hour ago, Function said: I already implemented everything that’s usually used as parameters in MR spectro in human brains... Could you recommend some studies that look at this?
Function Posted October 26, 2018 Author Posted October 26, 2018 1 minute ago, Prometheus said: Does that mean you have been performing multiple hypothesis tests on various peaks? Did you correct for type 1 error inflation, it might be that the finding is erroneous. Could you recommend some studies that look at this? Concerning type 1 errors: each patient had received a MR spectrum. Each spectrum had some characteristics (11, to be precise, of which 1 was categorical, the other ones continuous), which were all subjected to Shapiro-Wilk (in each subgroup per comparison), and variables with allegedly nonnormal value distributions were log-transformed, and the test was run again. And then, all variables were compared each time between 2 distinct groups (e.g., high-grade tumours v. low-grade tumours). I applied a Bonferroni correction in post hoc tests where more than 2 tumour categories were present (e.g., grade I v. grade II v. grade III v. grade IV), or when the categorical variable (which had 3 categories) turned out to be significantly different between any two (or more) groups. Post hoc chi-squared or Fisher's exact tests were then run, with Bonferroni correction applied to the significance level. For the other analyses, there was no need for type 1 error correction, as one could interpret each comparison to be a separate "study". Additionally, no variables were ever combined into one predictive model. That would have led me too far. I'll look for some articles that are representative for in vivo MR studies.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now