Hello fellow Stata users:
I have a panel dataset of patenting footprints of various companies. Each line in the dataset is a unique "company-year" identified by variables Company and Year. The other variables (columns) are patent classes and each value in the dataset is the number of patents that Firm X had in Year Y in patent class Z. So the patent data are arranged "horizontally" for each firm-year.
Now, here is my question. In Excel, I can easily compute correlations between any two firm-years. I simply type CORREL(..., ...) and then highlight the two horizontal arrays of firm-year patenting data. Is there a way to do the same in Stata? The "corr" command computes "vertical" correlations, that is correlations between specific variables across all observations. I need correlations between observations across all patent class variables. I have searched high and low but have not been able to figure out how to do it in Stata. Of course, I can export the data into Excel and compute those correlations manually in Excel but I would really like to be able to do it in Stata.
Any help will be greatly appreciated! Thank you! I will be happy to clarify if necessary.
Related Posts with Correlation between two observations across multiple variables
Cox-Model with very few observationsHello everybody, I am researching peace agreements and their durability if they include gender prov…
Graph: display negative sign using en-dash instead of hyphenHi list, Code: webuse auto,clear replace rep78=-1*rep78 if foreign==1 scatter rep78 trunk,ysc(r(-5…
How to find the matched observation with nearest Mahalanobis distance?Hi everyone, I am wondering how to find the matched observation with nearest Mahalanobis distance. …
Aggregating Weekly Data to MonthlySuppose I have a time series that has weekly realizations, but I want to average each week of a give…
Graph: couldn't get the looking of apostrophe rightHi list, I need to include an apostrophe in my figure. Someone asked me to change the looking of th…
Subscribe to:
Post Comments (Atom)
0 Response to Correlation between two observations across multiple variables
Post a Comment