ARCHIVED: In SPSS, how do I use the log of the dependent variable in a regression analysis?
To use the log of a dependent variable in a regression analysis, first
create the log transformation using the COMPUTE
command
and the LN()
function. Then specify the new variable in
the regression model.
Suppose y
is the original dependent variable and
x
is your independent variable. In the following example,
ln_y
is the name given to the new variable:
COMPUTE ln_y=LN(y). REGRESSION /DEPENDENT=ln_y /ENTER=x.
If you wish to compute the base 10 logarithm of a variable, use the
function LG10()
instead of LN()
.
If you have questions about using statistical and mathematical software at Indiana University, contact the UITS Research Applications and Deep Learning team.
This is document afic in the Knowledge Base.
Last modified on 2023-05-09 14:45:25.