Recently in the SAS Community Library: SAS' @Sundaresh1 highlights a sometimes overlooked task when applying document embeddings for purposes of similarity-based search. Normalisation of vectors helps obtain relevant matches.
I'm using SGPANEL, and would like to highlight certain panels that are interesting. I think I just want a way to set the wallcolor for each panel dynamically, is that possible?
Below code will make 3 panels, and all three will have the wallcolor set to yellow:
data have ;
input panelid x y ;
cards ;
1 10 10
1 20 20
2 10 15
2 20 15
3 10 20
3 20 10
;
proc sgpanel data=have ;
panelby panelid/ layout=panel;
styleattrs wallcolor="yellow" ;
series x=x y=y;
run ;
Is there a way I can make only the second panel have a yellow wallcolor?
I tried using a band plot in the background, which came close, but still extended the y-axis even though I set option NOEXTEND. I'm sure I could try other methods for adding a yellow bar in the background of second panel (e.g. REFLINE instead of a BAND), but before I go down that path, wondered if I'm missing an easier way.
My band plot approach:
data want ;
set have ;
if panelid=2 then do ;
lowerband=0 ;
upperband=100 ;
end ;
run ;
proc sgpanel data=want ;
panelby panelid/ layout=panel;
band x=x lower=lowerband upper=upperband /fillattrs=(color=yellow) noextend;
series x=x y=y;
run ;
Returned:
... View more
Please correct me if I miss something because just right now the example is a typical example showing how graph can make the user mad.
In the example two formats are used; one is assigned to the variable using the format statement ; the other one is set using the option tickvalueformat.
My original thought was that tickvalueformat would have priority over the variable format to set the tickvalues and that the variable format would be used to set the order of the bars.
However, in this example, we can see that the tick values are coming from the format assigned to the variable, but the format width is coming from the format given in the tickvalueformat option. As the default format label with of the sex format is 6, tick values are truncated.
proc format;
value $sex 'M'='Male'
'F'='Female';
value $sexnum 'M'='1-Male'
'F'='2-Female';
run;
proc sgplot data=sashelp.class noborder;
vbarbasic sex;
xaxis discreteorder=formatted tickvalueformat=$sex.;
format sex $sexnum.;
run;
proc sgplot data=sashelp.class noborder;
vbarbasic sex;
xaxis discreteorder=formatted tickvalueformat=$sex20.;
format sex $sexnum.;
run;
... View more
Good morning – I have basic knowledge of SAS EG. I usually make minor edits on existing program but I am trying to understand early delinquency rate by cohorts and have no idea how to go about it.
I have the following two tables and data fields:
Performance Table
loan_nbr : Unique identifier for each mortgage. Datatype varchar2.
entity_id : The code that identifies the entity. Datatype varchar2.
mthly_activity_dte : As of date. Datatype is char (YYYYMM).
active_flag : Flag to identify if the loan is in the entity's current book of business. A = Active N = Not Active.
loan_status_cde : The status of the mortgage. For active or delinquent mortgages, it is the status as of the mthly_activity_dte.
00 = Current
01 = 30 - 59 days delinquent
02 = 60 - 89 days delinquent
03 = 90 - 119 days delinquent
04 = 120 - 179 days delinquent
05 = 180+ days delinquent
06 = In Foreclosure
cur_upb_amt : The outstanding unpaid principal balance of the loan as of the mthly_activity_dte.
lpi_dte : The date of the last paid installment for the loan. Datatype is char (YYYYMMDD).
WLM table
loan_nbr : Unique identifier for each mortgage. Datatype varchar2.
entity_id : The code that identifies the entity. Datatype varchar2.
first_pmt_dte : The date of the first scheduled mortgage payment to be made by the borrower under the terms of the mortgage. Datatype is char (YYYYMMDD).
orig_dte : The date the mortgage was originated. Datatype is char (YYYYMMDD).
I am trying to pull the rate of loans that ever went 90+ delinquent (loan_status_cde = 03, 04, 05, 06) for the first year by month since first payment date. Similar to the table below.
Origination Year
Months Since First Payment Due Date
1
2
3
4
5
6
7
8
9
10
11
12
Year
Year
Year
Year
... View more
Hi all, I have some code that uses proc hpbin in SAS Viya, however everytime I try to run it in my environment - we get an error message saying that there is insufficient resources to proceed. I have tried breaking down the dataset into smaller chunks and using do loops but still have the same error. Are there any likely causes code wise or this just an environment issue? Also, are there any alternatives to using proc hpbin to perform binning? Thanks
... View more
My default region is Europe, but I need to create a course for PharmaSUG on the server for United States 1. How do I create an account away from my default region?
... View more