quotesgasil.blogg.se

Regress in stata
Regress in stata













regress in stata

Regress gnp year year2 yr* if inrange(year,1967,1990) in the specified range, so we're going to fill those in the dummy varibales generated have null values for years not Tab year if inrange(year,1970,1975), gen(yr) // generate dummy variables Gen year2=year^2 // get the square of the yearly variable Gen year = year(dofq(date)) // get yearly variable One thing to note, I am using a dataset that comes preloaded with Stata and this is usually a nice way to make a MVCE like Nick was saying in your other post. I am not sure why Pearly is giving you such a hard time, I think this may be what you're looking for, but let me know if it is something different:

regress in stata

Why does it bring different results then if x should be the same thing as year in this case? The way I understood it, _b, _b and _b call previously calculated coefficients for the corresponding independent variables and then multiplies it with them. Twoway function _b +_b*year + _b*year^2, range(1 70) If I then want to plot the estimated function without the dummies, why do these two bring different things? twoway function _b +_b*x + _b*x^2, range(1 70) I can't make the dummies manually, there will be more than 15 of them in the end). Regress y year year2 i.year if inrange(year,1,70) If I didn't have the restriction for dummies, I believe the commands would be: gen year2=year^2 I'm trying to create a regression that would include a polynomial (let's say 2nd order) of year on a certain interval of year (say 1 to 70) and a number of dummies for certain values of year (say for every year between 45 and 60).















Regress in stata