TU-L0022 - Statistical Research Methods D, Lecture, 2.11.2021-6.4.2022
This course space end date is set to 06.04.2022 Search Courses: TU-L0022
Marginal prediction plots of transformations (5:12)
This video goes through the marginal prediction plots of
transformations. The video explains the log transformation, how would
you interpret it, and marginal prediction plots for linear and
non-linear models.
Click to view transcript
It's fairly
common that we have both interaction effects and nonlinear effects from
log transformation in the same model. The interpretation of these
effects is done by plotting as well and you need to take that into
account when you construct the plot. So
let's first review the log transformation. The idea of log
transformation is that we take a log of either our dependent variable or
any of the independent variables and that changes the interpretation of
that variable to relative units. For example, if we're saying that the
prestige depends on a log of income then the interpretation of beta2
here would be how much prestige will increase if income increases 1%
relative to the current level. So
we're talking about relative effects of income changes to prestige. We
can also do it the other way around, so we have a log of income as the
dependent variable we have prestige as the dependent variable. Then the
interpretation would be how much income increases relative to the
current level when prestige increases by one point. So
log transformation makes a lot of sense for certain kind of variables
for example income. The raises that you get are usually in relative
terms and if you think what's the utility of each additional euro it
diminishes as your salary goes up so you need more raises. If you have a
thousand euros per month then adding a 1000 more is a huge effect. If
you have a 5,000 euros per month salary then increasing that by a
thousand euros, it's a lot, but it's not as huge difference as for
somebody who makes just a thousand euros per month. So
relative effects are done with log transformation. So how do you
combine these with interaction effects? This is the model estimated with
Stata. So we have prestige and women we have education, prestige and
percentages women, we have income and log of income as the dependent
variables. So we know this far that interpreting this model requires
that you plot. So you calculate
what is the fitted value for prestige for income as a function of
prestige holding education at the mean and comparing different levels of
percentage woman. So we could calculate the marginal prediction of
percentage woman is 0 50 and 100, holding education at the mean and
varying the prestige. The log
transformation here complicates things a bit but not by much. So instead
of calculating the predictions directly we calculate predictions using
the exact same procedure and then we just take exponential of those
predictions. So instead of predicting lines we predict a line and then
we take an exponential of that line. It
looks like that. This is from Stata again, margins plot command and we
have linear effects here and we have curvilinear effects here. So these
are relative effects. We have the effect of increasing prestige on
income for male-dominated professions and women-dominated the
professions and here we have the same effects with lines. As you can see
the interpretations are quite different. So here women get no income at
all as a function of prestige or no increase at all. Here
they get a relative increase but the absolute increase is less than for
men dominated professions. How do we know which one of these lines set
of three lines fits the data best? We can do that by simply adding
observations to this plot. So we can have plots like that and each
circle here is one profession. So
we have prestige for that profession and we have income for that
profession.The size of the circle presents the number of women. The
smallest circles are no women in that profession, the largest circles
are all women in that profession and here we can see that this set of
lines explains the data a lot better because here, for example, there
are no observations here. So we are extrapolating here so it doesn't
really fit and these are way too up for this line and particularly if
you look at the confidence intervals or prediction intervals. Then
we have here, we can see the prediction intervals here are large which
means that some of the observations can be up here and also we have no
observations here. So one way of ruling out outlier as an explanation
for lines or assessing which set of lines explains the data better is to
just plot the data and the lines in the same plot and that allows you
to compare.