New answers tagged

0

Maybe use b3.year (or 2003.year) instead of i.year ? Source: https://www.stata.com/features/overview/factor-variables/


0

I thought I'd add a more up-to-date answer than those given. I'm a Python guy, through-and-through, and here's why: Python is easily the most intuitive syntax of any programming language I've ever used, except possibly LabVIEW. I can't count the number of times I've simply tried 20-30 lines of code in Python, and they've worked. That's certainly more than ...


0

If Stata drop observations in a logit model with fixed effects, then this means that you have panels in which the dependent variable is always zero. The fixed effect for that panel then perfectly predicts (i.e. is perfectly collinear with) that outcome. Effectively you are estimating a conditional logit model. This doesn't happen in a linear probability ...


0

The $R^2$ has no meaning with 2SLS/IV regression since the residual sum of squares is not restricted to be smaller than the total sum of squares. So to answer your question: Yes, it might be negative. Stata supresses printing a negative $R^2$ when you use the ivreg command. For a detailed discussion of this question, see the detailed answer in Stata's FAQs ...


0

If you think a priori that gender will modify the effect of traditional values on having a supervisory job, than yes, add the interaction term. The p value given for the interaction term will tell you whether there is a significant difference in the way gender modifies traditional values effect on having a supervisory position.


0

Do other things differ? Do the chi-square tests give the same value? Do you have any missing data, are you handling this differently? In R, you are using pairwise deletion - I don't think you're using that in Stata. Can you check that your data are the same in both programs? In Stata, run su In R summary(matrix) You build the data in an unusual way. ...


0

From kappa - Stata "kap (second syntax) and kappa calculate the kappa-statistic measure when there are two or more (nonunique) raters and two outcomes, more than two outcomes when the number of raters is fixed, and more than two outcomes when the number of raters varies. kap (second syntax) and kappa produce the same results; they merely differ in how they ...


0

I wonder if you can just bootstrap the median prediction. I don't have my econometrics books with me and can't look this up because of pangolins, but the basic idea is below. If this is a stupid one, perhaps others can chime in on why that is. Here we will fit the TPM, use margins to get the average prediction, and calculate the median of the predictions by ...


2

As nobody more experienced with time series is answering, I will give a try. First, you should tell us clearer what is your goal---prediction or description/estimation of seasonalities. If goal is prediction, I think seasonalities should be part of the model, you should not deseasonalize first. As you have daily data, tou could find much information here. ...


1

I don't think the paper you cited applies since your outcome is neither logged, nor are you are using a non-linear model. The margins, eydx(x) is calculating the average, calculated across all time periods and observations, in your estimation sample of: $$\frac{\partial E[y \vert x]}{\partial x} \cdot \frac{1}{E[y \vert x]}=\beta_{x} \cdot \frac{1}{\hat y} ...


0

You can use gllamm in Stata for this. It is a user-written program that is still widely used, so I wouldn't hesitate to employ it for these purposes. You can find information on fitting such a model here (zip file with presentation, syntax, and data from a talk Sophia Rabe-Hesketh gave at a 2009 Stata conference). Simply install gllamm using ssc install ...


1

I will tender an answer since I have a better understanding of your problem and I am limited in my response in the comments. Just to be clear, it is important you have the correct difference-in-differences (DD) setup before conducting your placebo test. I assume you want to estimate the following model $$ y_{it} = \gamma T_{i} + \lambda Post_{t} + \delta(...


1

Let's consider a linear model under the usual assumptions (Gauss-Markov, normal error term, etc): $$y_i = \beta_0 + \beta_1x_{i1} + \beta_2x_{i2} + \epsilon_i$$ The way we solve for the OLS estimate of $\beta = (\beta_0,\beta_1,\beta_2)^T$ is by solving a multivariate minimization problem where we minimize square loss over all $n$ observations. $$L(y,\hat{...


2

I suspect the culprit here is that some of your observations have variable values that predict success or failure perfectly, but Stata will generally alert you to the fact. Take a peek at the "note" output that Stata produces. To understand this better, read the Model Identification section of the logit chapter in the pdf manual. This often happens when you ...


Top 50 recent answers are included