Announcement

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

  • histogram plot by group

    Dear all,

    I'm trying to plot the following
    Click image for larger version

Name:	Picture1.png
Views:	1
Size:	12.4 KB
ID:	1679240
    . A sample data set is also attached. Can anyone show me the code to plot this?
    Attached Files

  • #2
    Please see this website for an example on how to achieve that effect: https://stats.oarc.ucla.edu/stata/fa...wo-histograms/

    Comment


    • #3
      Here's what you were asked to post:

      Code:
      * Example generated by -dataex-. For more info, type help dataex
      clear
      input str48 id float int_rate str51 loan_status
      "68407277" 13.99 "Fully Paid"     
      "68355089" 11.99 "Fully Paid"     
      "68341763" 10.78 "Fully Paid"     
      "66310712" 14.85 "Current"        
      "68476807" 22.45 "Fully Paid"     
      "68426831" 13.44 "Fully Paid"     
      "68476668"  9.17 "Fully Paid"     
      "67275481"  8.49 "Fully Paid"     
      "68466926"  6.49 "Fully Paid"     
      "68616873" 11.48 "Fully Paid"     
      "68356421" 12.88 "Current"        
      "68426545" 12.88 "Current"        
      "68338832" 12.88 "Fully Paid"     
      "66624733" 19.48 "Charged Off"    
      "68466961"  6.49 "Fully Paid"     
      "68354783"  7.49 "Fully Paid"     
      "68466916"  7.49 "Fully Paid"     
      "68577849" 11.99 "Fully Paid"     
      "68506798"  8.49 "Current"        
      "68495092" 19.89 "Fully Paid"     
      "68566886" 12.88 "Fully Paid"     
      "68009401" 14.85 "Fully Paid"     
      "68476702" 13.44 "Fully Paid"     
      "68436666" 13.44 "Fully Paid"     
      "68476715"  7.49 "Fully Paid"     
      "67849662" 14.85 "Charged Off"    
      "68596180"  5.32 "Fully Paid"     
      "68526907" 17.97 "Fully Paid"     
      "68607141"  5.32 "Fully Paid"     
      "68526883"  5.32 "Fully Paid"     
      "67715283" 12.88 "Charged Off"    
      "68341789" 24.24 "Charged Off"    
      "68533595" 10.78 "Fully Paid"     
      "68415473" 13.99 "Charged Off"    
      "68537655" 12.88 "Current"        
      "68446769"  7.49 "Fully Paid"     
      "68367011" 13.99 "Fully Paid"     
      "68407301" 14.85 "Fully Paid"     
      "68356614" 11.48 "Fully Paid"     
      "68426865" 14.85 "Fully Paid"     
      "68476676" 15.77 "Fully Paid"     
      "68566951" 17.97 "Charged Off"    
      "68615044" 13.99 "Current"        
      "68527009"   9.8 "Fully Paid"     
      "68547583"  5.32 "Fully Paid"     
      "68587709" 13.44 "Fully Paid"     
      "68446771" 15.77 "Fully Paid"     
      "66796130"   9.8 "Fully Paid"     
      "68617034"  20.5 "Current"        
      "68387134" 17.27 "Fully Paid"     
      "68566925"  9.17 "Fully Paid"     
      "68516838" 17.27 "Current"        
      "68476697" 16.59 "Current"        
      "68566856" 11.99 "Current"        
      "68543413" 12.88 "Fully Paid"     
      "68366663"   9.8 "Current"        
      "68416916" 18.49 "Fully Paid"     
      "68444620" 11.99 "Fully Paid"     
      "68082535"  9.17 "Fully Paid"     
      "68466995"  7.91 "Fully Paid"     
      "68584507" 13.44 "Charged Off"    
      "68466924" 11.99 "Fully Paid"     
      "68367009" 18.49 "Fully Paid"     
      "68475450" 12.88 "Charged Off"    
      "68525943" 12.88 "Fully Paid"     
      "68340446" 14.85 "Charged Off"    
      "68615169"  8.49 "In Grace Period"
      "68397043" 14.85 "Current"        
      "68506862" 13.99 "Charged Off"    
      "68341799" 19.89 "Current"        
      "68487261" 13.44 "Fully Paid"     
      "68597047" 14.85 "Fully Paid"     
      "68366999" 23.13 "Fully Paid"     
      "68506885" 11.99 "Current"        
      "68394562" 15.77 "Fully Paid"     
      "68416953"  6.49 "Fully Paid"     
      "68587652"  5.32 "Fully Paid"     
      "68407333" 13.44 "Current"        
      "68466066" 18.49 "Charged Off"    
      "68436934" 19.89 "Charged Off"    
      "68617057" 10.78 "Fully Paid"     
      "68536799" 10.78 "Fully Paid"     
      "68357012"  8.49 "Fully Paid"     
      "68376217"  20.5 "Charged Off"    
      "68526942" 17.27 "Charged Off"    
      "68396080" 11.48 "Fully Paid"     
      "68385794" 10.78 "Fully Paid"     
      "68374676" 16.59 "Fully Paid"     
      "68547679" 12.88 "Fully Paid"     
      "68537594"  7.91 "Fully Paid"     
      "68565856"  9.17 "Fully Paid"     
      "68367006"  6.49 "Fully Paid"     
      "68426699"  6.49 "Fully Paid"     
      "68377020"  5.32 "Fully Paid"     
      "68446746"  5.32 "Fully Paid"     
      "68537564" 10.78 "Fully Paid"     
      "68446784" 10.78 "Fully Paid"     
      "68376533"  7.49 "Fully Paid"     
      "68476714" 11.48 "Fully Paid"     
      end
      No data attachments please! https://www.statalist.org/forums/help#stata

      Comment


      • #4
        Thanks, Ken and Nick!

        Comment

        Working...
        X