Input str10 cik long grantId str10(peerCIK peerTicker) str80 peerName int fiscalyear byte fiscalmonth Here the example data from the first dataset: When showing example data, always use -dataex. When asking for help with code, always show example data.
If you provide too restricted an example, you may be given code that works for your example but fails in your real data.
Make sure that the data reflects the variety of ranges of time and number of peers that you are facing. In particular, make sure that the data from the two sets you want to merge together actually include observations that match each other. In selecting example data to show, make sure it represents the problems you are facing. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. dataex- will save you time it is easier and quicker than typing out tables. Either way, run -help dataex- to read the simple instructions for using it.
If not, run -ssc install dataex- to get it. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. Please post back with examples of both data sets, using the -dataex- command. I doubt anyone will be able to give you specific advice without seeing example data. I hope the description of the problem is ok. incorporating only the share price return of the last five years (range of t not constant) linking/merging two (big) datasets (each company can be identified by an unique Id in both datasets) multiple linear regression with different number of independent variables
So I face different problems at the moment: Return Apple, t = β 0 + β 1*Return Alphabet, t + β 2*Return Microsoft, t + β 3*Return Facebook, t t ranges from 2009-2013 I need the beta coefficients for each of the peer companies on the share price returns for the five years befor 2014. I need for any company and year (2014-2016) a multiple linear regression.įor example company Apple has in 2014 a peer group consisting of the companies Alphabet, Microsoft and Facebook. There is also another dataset with share price returns for a longer period for all those companies. I have a dataset with many companies and their peer groups (consisting of other companies) for the years 2014-2016. I'm new to stata and need some help for my analysis.