 Yksi kertaa, että lopulta-regrason analysointi on yksityisen lopulta, on marginaalipeliksen. Tämä on hyvin käytännössä teknikin, koska se on kertaa. Ennen kuin yksityisen lopulta, miten kaikki eri lopulta-regrason analysointi on yksi kertaa, on vain yksi kertaa. Yksi kertaa on, että tämä kertaa jää teille yksityisen lopulta, In the case of logistic recursion analysis, you will directly see what is the effect of each independent variable on the predicted probability to do plotting within some data. And I will use the Hosmer and Levenson data, so this is from a widely cited recursion analysis book, and the data are about babies born to different kinds of mothers. The dependent variable is whether the baby was born as low birth weight defined as less than two and a half kilos, and we are looking at the weight of the mother at last menstrual period, the race of the mother and whether the mother smoked her impregnancy as our interesting independent variables. We are first going to fit a linear probability model and logistic recursion model to this data. And I'm using this data here. We have the linear probability model here and we have the logistic recursion model here. And the dependent variable was the low birth weight and we can see from the linear probability model it's easy to interpret. We get the predicted probability of having a low birth weight baby increases for its 0.22 higher for black women than for white women. That is the reference category. It is 15% higher for smokers than for non smokers. So we can directly interpret the effects. Here the odds ratios, we can say that the odds for a black mother are 3.5 times greater than for a white mother. But that doesn't really tell us anything about the increase in probability because the odds is a proportional effect. We have to know it's a relative effect. We have to know what is the original odds that is being increased by 3.5. Plotting is very useful to understand what does these effects look like. So when we compare the effects of raising smoke, we can't really, these are not really comparable. So it's difficult to say whether 3.5 increase in odds is a larger effect than a 22% increase in probability because they are expressed in different scale. And we are usually interested in the original scale of the variable. Also we can't from this model directly say what is the expected difference between black smokers and white non smokers. The whites are the base category here. So black mothers is 0.22 and smokers is 0.16. So it's about 40% difference between black smokers and white non smokers. Easy to see from this model. Here we say that the black mother has 3.5 times greater odds and smokers have 2.5 times greater odds. So we multiply these together and it's about 8 or 9 something like that times higher odds for black smokers than white smokers. But that's difficult to interpret. So how we can do that is we can apply the marginal prediction plots. The status margin command or R's effects command will do that for you quite easily. This is from Stata. So this is the linear predictions. And we can see from the linear model that the effect of birth weight here is the same for all kinds of mothers. So we have 3 races here and the effect of birth weight at the last menstruation is the same for all mothers. So the mothers only differ with respect to the base level. So what's the intercept because we estimate the effect of a race. For the logistic recursion model we can see that it's the same base differences here. But the shape of these curves is different. So this curves are flatness more thin. Flatness here more and these are a lot steeper curves. So when we have a mother that doesn't weight much so these are pounds then for all races the likelihood of having a low weight baby is large. And we can see that for all races the likelihood gets smaller. But also the likelihood of probability actually converges here. So if you are a very big mother then you are going to have a very big child. And which one of these fits the data better is partly an empirical question. So one way to understand which of these plots works better is to plot the data over these plots and to see which two sets of lines explains the data better. So we can see here that the linear probability model predicts a negative probability for some heavy white mothers. And this model always predicts between 0 and 1 so this is statistically more appealing. But if we don't have any mothers here so if all white mothers are quite light then the fact that we predict implosible values when we go beyond our data is not really a problem. So this is that which one of these is better. You can justify it based on theory but you can also check empirically which one of these fits the data better. The logistic recursion analysis is typically used by default because it's a safer choice to apply but this linear probability model can be used as well as long as you don't do negative predictions or predictions that exceed one for any of the cases in your sample.