Dear All, Suppose that I have the following data
How can I obtain correlation coefficients between A and B, along with their p-values over/by `stkcd'. Thanks.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(stkcd A B year) 2 -.01321 .0649455 2001 2 -.17586 .1972809 2002 2 -.15283 .3979636 2003 2 .103938 -.215786 2004 2 .077891 .100931 2005 2 -.05099 -.0849801 2006 6 .080194 6.26e+08 2001 6 .035823 -1.42e+08 2002 6 -.06987 -5.34e+08 2003 6 .041957 -4.57e+08 2004 6 -.01533 -8.77e+07 2005 6 .011217 -4.21e+08 2006 end
Comment