Recent Activity
I am using SAS Enterprise Guide 8.3 to connect to SAS VIYA. When I try to make a connection I get an error Unable to connect to the metadata server, with server response: The client has connected to a SAS Workspace Server (v1.0) when it intended to connect to SAS Metadata Server. I am also appending image of the error. The SAS Viya environment was set 5 years ago (2020), and there were no changes to the environment to our knowladge. In the past we were able to do this connection. To our knowladge we did not have a SAS Metadata Server set up, and it was said to us at the time (in 2021) that we do not need it. Does anyone know what the problem could be and how to fix it?
... View more

0
7
In the sgplot below, I am trying to create a graph that draws attention to "North America" and coding it so that when I update the data next year, even if the order by "growth_rate" (which is defined by proc sort) changes (i.e., North America is no longer the region with the worst growth rate in 2025), every time the horizontal bars are created for North America they will have the respective reddish colors chosen in the data step "have3" and all other regions will have the bluish colors chosen in the data step "have3". Could someone help me understand why SAS is not correctly applying the colors defined for the variable color (and instead is using shades of gray that I have not indicated)? Also how to make my code works as I intend? In other words, I am trying to create a graph that always draws attention to North America by assigning it a unique colors. Any insight is welcome! Here is my code: data have; input code region &$20. growth_rate year; datalines; 0 North America -5.92 2020 0 North America -2.18 2021 0 North America -7.47 2022 0 North America -2.17 2023 0 North America -9.64 2024 1 South America 0.36 2020 1 South America 2.69 2021 1 South America -8.13 2022 1 South America 1.22 2023 1 South America -1.34 2024 2 Asia -1.53 2020 2 Asia 2.18 2021 2 Asia 5.64 2022 2 Asia 6.80 2023 2 Asia 8.70 2024 3 Europe -9.68 2020 3 Europe 3.91 2021 3 Europe 5.48 2022 3 Europe 3.52 2023 3 Europe 3.69 2024 4 Africa 3.29 2020 4 Africa 7.97 2021 4 Africa 2.48 2022 4 Africa 7.36 2023 4 Africa 1.31 2024 5 Oceania 8.00 2020 5 Oceania -6.05 2021 5 Oceania 6.91 2022 5 Oceania -1.09 2023 5 Oceania -7.46 2024 ; run; proc sort data=have(where=(year=2024)) out=temp; by descending growth_rate ; run; data fmt; set temp(rename=(region=start)); retain fmtname 'fmt' type 'c'; length label $ 80; label=repeat(' ',_n_)||strip(start); keep fmtname type start label; run; proc format cntlin=fmt; run; data have2; set have; _region=put(region,$fmt32.); if region="North America" then call symput('NorthAmerica',_region); run; data have3; set have2; if _region="North America" then do; if year=2020 then color="#f7ebde"; else if year=2021 then color="#efdbc6"; else if year=2022 then color="#e1ca9e"; else if year=2023 then color="#d6ae6b"; else if year=2024 then color="#b4771f"; end; if _region NE "North America" then do; if year=2020 then color="#deebf7"; else if year=2021 then color="#c6dbef"; else if year=2022 then color="#9ecae1"; else if year=2023 then color="#6baed6"; else if year=2024 then color="#1f77b4"; end; run; %sganno data sganno; %SGTEXT(LABEL="North America",TEXTWEIGHT="BOLD",TEXTCOLOR="RED",TEXTSIZE=10, FILLCOLOR="white",FILLTRANSPARENCY=0,WIDTH=40,Y1SPACE="DATAVALUE",X1SPACE="LAYOUTPERCENT",YC1="&NorthAmerica.",X1=6 ) run; proc sgplot data=have3 sganno=sganno; title "Growth rate"; styleattrs datacolors=(color); hbar _region / response=growth_rate group=year groupdisplay=cluster clusterwidth=0.9 datalabel DATALABELFITPOLICY=NONE datalabelattrs=(size=8pt) barwidth=1 nooutline transparency=0 dataskin=none; xaxis display=(nolabel) min=-12 max=12; yaxis display=(nolabel) colorbands=even ; run;
... View more

0
5
Hi, I want to tune the hyperparameters of a logistic regression model using a dataset that has a _partind_ column (train='1', validate='0', test='2') and using CAS capabilities. I think PROC LOGSELECT is discarded since it has no AUTOTUNE statement such as PROC GRADBOOST even though it is CAS-enabled. I'm currently trying the Autotune Action Set (as per the example in https://documentation.sas.com/doc/da/pgmsascdc/v_061/casactml/casactml_autotune_examples66.htm). However, documentation is not quite clear to me. Question 1: Given the following code (which is in the link above) proc cas noqueue;
autotune.tuneLogistic /
trainOptions={
table={name='GETSTARTED'},
class={{vars={'C'}}},
model={
depVars={{name='y'}},
effects={
{vars={'C', 'x1', 'x2', 'x3', 'x4', 'x5',
'x6', 'x7', 'x8', 'x9', 'x10'}}
}
},
savestate={name="logistic_getstarted_model"}
}
tunerOptions={seed=12345}
/* Tuning Parameters
You do not need to specify any tuning parameters for the default
tuning process. If you want to make adjustments to the default
tuning process, uncomment the following block of code and change
any of the tuning parameters' attributes.
tuningParameters={
{name="method",
valueList={"BACKWARD", "FORWARD", "LASSO", "NONE", "STEPWISE"},
initValue="STEPWISE", exclude=false},
{name="slEntry", lb=0.01, ub=0.99, initValue=0.05, exclude=false},
{name="slStay", lb=0.01, ub=0.99, initValue=0.05, exclude=false},
{name="stopHorizon",lb=1, ub=5, initValue=3, exclude=false},
{name="lassoRho", lb=0.1, ub=0.9, initValue=0.8, exclude=false},
{name="lassoSteps", lb=10, ub=100, initValue=20, exclude=false}
}
*/
;
ods output TunerResults = TuneResults(keep=MisclassErr);
ods output EvaluationHistory = EvalHistory;
ods output IterationHistory = IterHistory;
run;
quit; and considering the tuningParameters={{autotuneTuningParmDefinition-1},...} section of the documentation (https://documentation.sas.com/doc/da/pgmsascdc/v_061/casactml/cas-autotune-tunelogistic.htm#SAS.cas-autotune-tunelogistic-tuningparameters-namepath), where it is stated that each autotuneTuningParmDefinition-n has a namePath="string" (alias name) such that "it specifies the name path of a tuning parameter. For a nested action parameter, this parameter specifies a dot-separated path that includes all its parent parameter names. For a top-level action parameter, this parameter is simply the name of the parameter." Is the user supposed to fully specify the parameter that is being referenced from the logistic action ??? If so, how does SAS Viya know that {name="method",...} in the example code above refers to the parameter hierarchy regression.logistic / selection={method="BACKWARD" | "ELASTICNET" | "FORWARD" | "LASSO" | "NONE" | "STEPWISE"} ??? (I assume this is the hyperparameter that was referenced in the example code because of the similarity in options; see https://documentation.sas.com/doc/en/pgmsascdc/v_061/casactstat/cas-regression-logistic.htm#SAS.cas-regression-logistic-selection). Shouldn't {name="method",...} be {name="selection.method"} because there are multiple other "method" parameters such as regression.logistic / polynomial={{standarize={method="MOMENTS" | "MRANGE" | "WMOMENTS"}, ...}, ...} ??? Question 2: As per the predefined train-validate-test partition of my dataset, I think I should use userDefinedPartition=TRUE|FALSE "when set to True, includes a user-defined partition for training and scoring." ( https://documentation.sas.com/doc/da/pgmsascdc/v_061/casactml/cas-autotune-tunelogistic.htm#SAS.cas-autotune-tunelogistic-tuneroptions-userdefinedpartition ). But how ??? There is no reference on how to tell SAS what my partition column and values are.
... View more

0
0
I am trying to insert pictures within a PROC REPORT. I believe I understand the basic mechanics, but would like the picture to shrink to fit if the cellwidth is not as wide as the picture. Is this something that can be done? proc report data=dsn nowd;
column image;
define image / "TITLE" computed style(column)=[cellwidth=4in];
compute image / char;
call define(_col_,'style',"style=[preimage='/path/SGPlot1.png']");
endcomp;
run; The code above is what I used to produce the PROC REPORT to insert a single image. It cuts off the right-hand side of the image because the image is just a little bit wider than the 4in cellwidth I declared. I would like it to instead shrink the image.
... View more

0
2
I have an issue in SAS Viya. In a geographical map, I added a selection filter for the "DIMENSION" field (values G, M, P) on the value G. Then, I added a link to a page "LIST" with a table containing the complete list of fields. When I double-click on the geographical map, it takes me to the table by page"LIST" , but it doesn't filter only the G values: I have all table. Otherwise if I filter the geographical map using a dropdown menu, the G filter works also when linking to the page with the table.
... View more

0
3
Unanswered topics
These topics from the past 30 days have no replies. Can you help?