Regress x on y stata1/2/2024 Then, I want Stata to do this exact same process for every firm.Ĭould anyone please help me? I've provided a sample data set in the attachments. So, I need to obtain the independent variables in vectors. The STATA output looks like: Date: January 30, 2013. The com-mand for nding a regression line is regress. This way I will find a wide number of regressors, and I would like Stata to store every factor for every independent variable for T+1, t+2, t+3, t+4 and t+5 (I need them later to backtest whether E_Next_T is similar to the real values). x y-1 -5 0 -3 1 -1 2 1 3 3 What is the equation of the line y + x y x 3 1 3 2 2 y x 3 2(3) 3 y 3 + 2x If we input the data into STATA, we can generate the coe cients automatically. Then I want the code to regress the data from t-13 until and including t-4 to forecast t+4, regress t-12 until and including t-3 to forecast t+3, regress t-11 until and including t-2 to forecast t+2, regress t-10 until and including t-1 to forecast t+1. In all of these regressions, the dependent variable is E_Next_T and all the independent variables are NegE, E, NegE_Times_E, B and TACC. Namely, I want the code to regress the data from t-14 until and including t-5 to forecast t+5. In simple words, this type of regression is suitable when dependent variable is ordinal in nature. Please see my attached data file for an example. Ordinal Regression is used to predict ranked values. lets say: regress X Y i.Z Is there a way to include the 3 variables in one graph What i want is basically a linear prediction graph that, instead of 1 line graphing the relationship between variables X and Y, includes 1 line for each category of Z. We will illustrate the basics of simple and multiple regression and demonstrate. First of all, I am trying to build a code which loops a number of regressions for a firm. This first chapter will cover topics in simple and multiple regression, as well as the supporting tasks that are important in preparing to analyze your data, e.g., data checking, getting familiar with your data file, and examining the distribution of your variables. I have a similar question, but involves a bit more complexity. Let Y be the dependent variable in a regression (any kind) and X one of the predictors.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |