Let me take a stab at trying to understanding what it is you are trying to do: ![]() (In excel this is simply copying the column and only paste the values) I someone knows the command to 'fix' these x values and 'de-link' them from the original formula, the problem might be solved. and then running the regression on this fixed value. I hoped that it was possible to add an option in the regression formula, but another possible solution might be: saving the values of qcount as fixed values (which can not change when another variable changes) and then running the regression on this fixed value. The reason for this is that I want to use the cumulative lagged value of x (gen qcount = l.count + l2.count + l3.count) However I want to use the x values for any observation that has non-missing x, but also for missing y.Ģ) I want to include all observations of x even when the y value of this observation is missing. As you mention Stata does indeed the following: The x values are used for any observation that has both non-missing x and non-missing y. Hopefully I can make my question more clear:ġ) With x variables I mean observations, sorry for this. Imputation or interpolation is not really what I am looking for since I do not want to fill these missing y values. It seems to look like Stata drops the observations at time 1,2,4 and therefore excludes the x variables as well.ĭoes anyone have a solution to exclude the missing y variables while not excluding the x variables in this regression? As a result, qcount will not include all the lags I asked for. This is indeed what I want, but what Stata also does, is excluding all observations of x if y has a missing value. Gen qcount = l.count + l2.count + l3.countįrom some tests I assume that Stata excludes all observations with a missing value of x. ![]() The x var (qcount) is created by the following formula: For each month I have a variable count, but the variable y is only available 4 times per year (quaterly). From this data I would like to run a regression on variable x, where x is the sum of three lags of the variable count. I have a question about my regression on monthly data of 500 companies which I defined as panel data sorted by gvkey and date.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |