 on aika common that we have both interaction effects and non-linear 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 That changes the interpretation of that variable to relative units. For example if we are saying that their prestige depends on log of income then interpretation of beta 2 here would be how much prestige will increase if income increases 1%, relative to the current level. So we are talking about relative effects of income changes to prestige. Voimme myös tehdä se yksi kertaa, joten meillä on log of income as the dependent variable. We are 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 this 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 1000 euros per month, then adding 1000 more is a huge effect. If you have 5000 euros per month salary, then increasing that by 1000 euros. It's a lot, but it's not as huge difference as for somebody who makes just 1000 euros per month. So relative effects are done with log transformation. So how do you combine these with interaction effects? This is a model estimated with our status. So we have prestige and women. We have education and prestige and percentage 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 mean, and comparing different levels of percentage women. So we could calculate the marginal prediction of percentage women is zero, 50 and 100 holding education at 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 an exponential of those predictions. So instead of predicting lines, we predict a line and then we take an exponential of that line. How does it looks like that? This is from state again, margin plot command. We have linear effects here and we have curvilinear effects here. So these are relative effects. We have effect of increasing prestige on income for male-dominated professions and women-dominated professions. And here we have the same effects with lines. As you can see, the interpretations are quite different. So for 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, instead of three lines fits the data best? We can do that by simply adding the observations to this plot. So we can have plots like that. And each circle here presents a combination of... 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 these sets of lines, 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 off for this line, 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.