Hello all!
I've got a panel data with variables: firmid, year, and rdexpenditure.
I want to get the standard deviation of the residuals from the R&D expenditure trend of the firm over the past 5 years. I was considering using asreg. The command is:
asreg rdexpenditure year, window(year 5) by(firmid) fitted
But only 3 residuals returned for each firm over 5 years. Is it oorrect to compute the standard deviation with only 3 residuals? If not, is there any comand I can use to get all the 5 residuals properly?
Thank you for your help!
Related Posts with How to get residuals returned after a rolling window by groups regression?
Sorting VariablesHi I need to create a certain variable by sorting other variables, but I am not sure how to sort t…
Dataset merging to maximize number of observationsHi, I would like to merge two datasets. Both datasets have the following columns: Year Gvkey Cusip …
Dropping all Observations in a Longitudinal Data Set if Two Conditions are met.Hi Stata users, I am trying to drop entire records of individuals from this set if they had an oppo…
Dynamic binary panel models with endogeneityHi all, I have a question related to dynamic panel analysis. As we know, xtabond2 is suitable to u…
Aggregate data based on two variablesHello Stata Community, I am new to Stata and have a question regarding the aggregation of a dataset…
Subscribe to:
Post Comments (Atom)
0 Response to How to get residuals returned after a rolling window by groups regression?
Post a Comment