Hi everyone,
I am writing to seek assistance with centering the values of "HR (95% CI)" in a PROC SGPLOT procedure.
Currently, in my code, the values of "HR (95% CI)" (Var name=HR2)are aligned to the left, and I would like to center them instead. However, I am unsure how to achieve this.
Below is my SAS code:
proc sgplot data=forest_subgroup_2 nowall noborder nocycleattrs dattrmap=attrmap noautolegend;
format text $txt.;
styleattrs axisextent=data;
refline ref2 / lineattrs=(thickness=13 color=cxf0f0f7);
highlow y=obsid low=CIL high=CIU;
scatter y=obsid x=hr / markerattrs=(symbol=squarefilled);
scatter y=obsid x=hr / markerattrs=(size=0) x2axis;
refline 1 / axis=x;
text x=xl y=obsid text=text / position=bottom contributeoffsets=none strip;
yaxistable subgroup / location=inside position=left textgroup=id labelattrs=(size=7)
textgroupid=text indentweight=indentWt;
yaxistable HR2 pvalue/ location=inside position=right pad=(right=15px)
labelattrs=(size=7) valueattrs=(size=7) ;
yaxis reverse display=none colorbands=odd colorbandsattrs=(transparency=1) offsetmin=0.0;
xaxis display=(nolabel) /* TYPE=LOG TYPE=LOG LOGSTYLE=LOGEXPAND LOGBASE=10 */ values=(0.0 0.5 1.0 1.5 2.0 2.5 3.0 );
x2axis label='Hazard Ratio' display=(noline noticks novalues) labelattrs=(size=8);
run;
Could you please advise me on how I can modify the yaxistable HR2 code to center align the values of "HR (95% CI)"?
Thank you very much for your attention to this matter. I look forward to your guidance.
... View more
Hi all,
Please help me to code this. This is the dataset below-
I have 2 drugs being used for each ID i.e., SGA and DM. I have multiple start date and end dates for each ID and drug. I want to see if the DM_start falls into any of the SGA_start and SGA_end under each id. That is DM_start of period 3 can fall in the SGA_start and SGA_end of period1.
And also calculate the number of overlapping days for each time period. I want to know the no. of days for each orange period.
Thank you all in advance,
Any help would be appreciated.
... View more
Please help me with error: Error: The connection could not be established to a SAS Workspace Server named 'Local' running on port on host 'localhost'. Please verify the following: - The correct hostname and port number were specified. - If a firewall is present, it is correctly configured to allow this access. - An object spawner has been started on the server. - The SETINIT on the server is not expired. Please contact your SAS Administrator if the problem persists. Server response: Server execution failed
... View more
Hello Everyone, I am facing an issue with SAS Viya user activity report as SAS Job to update CAS audit data keeps on failing in SAS Viya 4. I have different types of user IDs which authenticate to SAS Viya. Most of them are just numbers and few are only characters. I am able to list the data from CLI, but it fails when data is being uploaded to CAS table (from CSV) for reporting. NOTE: Active Session now server. {rowsDeleted=0} ERROR: The variable User ID has been specified with incompatible data types. as per my initial investigation, I suspect this is because of the GUSSINGROWS function of SAS import. so it only considers first 20 rows (default) to decide the data type of a column. So if there are only number IDs in first 20 rows, it decides the data type as "double", but as there can be character user IDs also, the data type should be varchar and then, it fails with above error. Is there a way to change this default value or anyone who has faced similar problem and was able to fix this?
... View more