I log-transformed a ratio variable (sem), which ranged from 5.73e-10 to .0001021 (mean: 1.72e-06, s.d.: 2.15e-06).
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sem | 9176 1.72e-06 2.15e-06 5.73e-10 .0001021
To prevent negative numbers after log transformation, I added 1 to the original variable like below.
gen lsem=log(sem+1)
But, the log transformation was failed as follows. All values remained unchanged.
Variable | Obs Mean Std. Dev. Min Max
-------------+--------------------------------------------------------
sem | 9176 1.72e-06 2.15e-06 5.73e-10 .0001021
lsem | 9176 1.72e-06 2.15e-06 5.73e-10 .0001021
What was wrong? How can I log-transform this variable?
Related Posts with log transformation of a ratio variable with small values
m:1 merge | r(9) code halting do fileHello all, I have a do file with a m:1 merge merging in mutation characteristics (missense mutation…
Best way to mark a sample containing the balanced panel of observations with nonmissing data.I'm trying to mark a sample for a user program such that the sample is a balanced panel given certai…
Bootstrapping standard errors for two-stage program combining cross-sectional and panel dataI have two samples from different populations from which I am conducting a two-stage estimation proc…
Help with truncationDear Stata Members I need a help with respect to truncation and how operationally it is different fr…
Questions about recoding in panel dataHi there! I have a problem in recoding the panel data. As you can see below, this panel data describ…
Subscribe to:
Post Comments (Atom)
0 Response to log transformation of a ratio variable with small values
Post a Comment