Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • JACCARD similarity measure

    Hi I am working on similarity measure on the different assets classification. I have close to 12 assets classes for more than 50 banks spanning from 2000Q1-4 -2019Q1-4 for each assets class. I am interested in calculating the similarity measure amongst each asset class using the Jaccard measure and i do not know how, is there anyone that can help with a clue or a guide. My data sets has been reshaped wide. BANKID represents the each banks, while each assets class is defined by the quarter period.
    BANKID cash_bal2000Q1 securities2000Q1 fedfnd_revrepo2000Q1 loan_lease_hfs2000Q1 Joint-venture2000Q1 other assets2000Q1 TradingAssets2000Q1 IntangibleAssets2000Q1 otherrealestate2000Q1 securities2000Q1 fixedassets2000Q1 net-loans2000Q1
    100003 0.0523267 0.3282848 0.0035845 0.0051423 0.0035845 0.0523267 0.3282848 0.0035845 0.0051423 0.0035845 0.0523267 0.0035845
    100134 0.023778 0.2791913 0.0038878 0 0.0038878 0.023778 0.2791913 0.0038878 0 0.0038878 0.023778 0.0038878
    100135 0.0230704 0.2506895 0.00654 0.000572 0.00654 0.0230704 0.2506895 0.00654 0.000572 0.00654 0.0230704 0.00654
    100144 0.1323925 0.0914672 0.0345783 0 0.0345783 0.1323925 0.0914672 0.0345783 0 0.0345783 0.1323925 0.0345783
    100154 0.0534938 0.0709148 0.0026255 0.0053682 0.0026255 0.0534938 0.0709148 0.0026255 0.0053682 0.0026255 0.0534938 0.0026255
    100161 0.0506434 0.2294578 0.0018176 0.0080809 0.0018176 0.0506434 0.2294578 0.0018176 0.0080809 0.0018176 0.0506434 0.0018176
    100165 0.0256106 0.2885543 0.0335942 0.0220141 0.0335942 0.0256106 0.2885543 0.0335942 0.0220141 0.0335942 0.0256106 0.0335942
    100173 0.0333732 0.2799982 0.0094496 0 0.0094496 0.0333732 0.2799982 0.0094496 0 0.0094496 0.0333732 0.0094496
    100184 0.0518307 0.2053013 0.0196109 0.0006451 0.0196109 0.0518307 0.2053013 0.0196109 0.0006451 0.0196109 0.0518307 0.0196109
    100185 0.0379655 0.3561531 0.004141 0.0001412 0.004141 0.0379655 0.3561531 0.004141 0.0001412 0.004141 0.0379655 0.004141
    100196 0.0873589 0.2289798 0.0161368 0.0026473 0.0161368 0.0873589 0.2289798 0.0161368 0.0026473 0.0161368 0.0873589 0.0161368

  • #2
    You have accidentally posted your topic in Statalist's Mata Forum, which is used for discussions of Stata's Mata language, which is different than Stata's command language. Your question will see a much larger audience if you post it in Statalist's General Forum.

    Also, if you have not already done so, take a look at the Statalist FAQ linked to at the top of this page for posting guidelines and suggestions. Note especially sections 9-12 on how to best pose your question. It's particularly helpful to copy commands and output from your Stata Results window and paste them into your Statalist post using code delimiters [CODE] and [/CODE], and to use the dataex command to provide sample data, as described in section 12 of the FAQ.




    Comment

    Working...
    X