ASSALAM O ALAIKUM FRIENDS HOPE YOU ALL GOOD:
A normally asked question how we can take log if we have negative values in our variables , suppose i m taking about Interest rate from 1990-2014 ,i have all values positive but few ones are negative so when we have negative values in our data we fail to take log so what is solution ,because someone wants to take log.
the simple answer is take the minimum value from your variables suppose the minimum value was-34 its supposed values so add to all years/values +35 (add one more values) now you will see your all values become positive now you can take log.
further i have few comments about taking log of negative values
Nawaz Ahmad In this case, you required double transformation; first square to avoid negative sign followed by log as Robert Angel did in GARCH 101 paper.
Dr. Markus von Ins Nawaz Thank you for the hint with the double nested transformation. I would also try to add a constant k to all values in such a way that all resulting values are positive and then take the logarithms: y = log(x+k)
Dr. Markus von Ins You calculate the minimum of the distribution (min = -k). Then you might add (k+1) such that the smallest value equals 1.
thank you so much sir suppose i have negative value -3 and this value is minimum in my data so i can add +3 to all values as constant?
Dr. Markus von Ins Not exactly. If the minimum is -3 then you should add +4 such that the new minimum is 1.
Find minimum value of the variable and add it as a constant to the entire series, then take log
now what if i have negative values in my data which is minimum in series so ans is with following example.Muhammad Ali Shuja Lets assume that minimum value of your series is -11.556. Then you should add 12 (rounding to the right) then the whole series will become positive and it will be perfectly collinear with your original series which means that it will not lose its properties. Once you have positive values then you can use all functions that require a variable to be positive.
A normally asked question how we can take log if we have negative values in our variables , suppose i m taking about Interest rate from 1990-2014 ,i have all values positive but few ones are negative so when we have negative values in our data we fail to take log so what is solution ,because someone wants to take log.
the simple answer is take the minimum value from your variables suppose the minimum value was-34 its supposed values so add to all years/values +35 (add one more values) now you will see your all values become positive now you can take log.
further i have few comments about taking log of negative values
Nawaz Ahmad In this case, you required double transformation; first square to avoid negative sign followed by log as Robert Angel did in GARCH 101 paper.
Dr. Markus von Ins Nawaz Thank you for the hint with the double nested transformation. I would also try to add a constant k to all values in such a way that all resulting values are positive and then take the logarithms: y = log(x+k)
Dr. Markus von Ins You calculate the minimum of the distribution (min = -k). Then you might add (k+1) such that the smallest value equals 1.
thank you so much sir suppose i have negative value -3 and this value is minimum in my data so i can add +3 to all values as constant?
Dr. Markus von Ins Not exactly. If the minimum is -3 then you should add +4 such that the new minimum is 1.
Find minimum value of the variable and add it as a constant to the entire series, then take log
now what if i have negative values in my data which is minimum in series so ans is with following example.Muhammad Ali Shuja Lets assume that minimum value of your series is -11.556. Then you should add 12 (rounding to the right) then the whole series will become positive and it will be perfectly collinear with your original series which means that it will not lose its properties. Once you have positive values then you can use all functions that require a variable to be positive.




0 comments:
Post a Comment