Recent Activity
Dear SAS Community, I have many categorical variables in my data, and I have been using the following analytic procedure to get my 2x2 results with column counts and percentages, but I would like to add brackets separating the counts from the percentages in the form of xx (%) instead of xx %. Below is the code and sample view of the current outputs. /*Obtaining 2x2 counts and percentages for all categorical variables stratified by Age Category Columns */ Proc Freq Data=Analysis; Tables _Char_*Age_Category/Chisq norow nopercent; run; The above code generates results for the variables including column counts and percentages as follows (see sample below). Copying results from each cell and then adding brackets in the word file for each cell takes a lot of time and I would like to find a solution on how to add the brackets, for example, for the first cell to be produced as 9 (1.35). I will be glad to receive assistance and sample code that I can apply to my data for such procedures. Thank you.
... View more

1
10
I used the proc phreg command to estimate the significant covariates for a Cox Model. I got the significant covariates together with the hazard ratios. How then do I estimate the baseline hazard function I may use to calculate the hazard rate and estimate survival probabilities on new data. I tried using the baseline command but it is just giving me different cumulative baseline hazards at different times. I need a function that is dependent on time to use on new data to calculate survival probabilities.
... View more

0
2
I am simulating data for a 2-groups trial with 100 subjects in each group. There are four variables: GROUP, SUBJNO, SEX, AGE. SEX and AGE are covariates for following model.
Here is my code:
%let seed=12345;
data tab1;
call streaminit(&seed.);
length subjno $4 sex $1;
do _n_=1 to 100;
group=1;
subjno='1'||put(_n_,z3.);
sex=choosec(rand('table',0.5,0.5),'M','F');
age=rand('integer',18,70);
output;
end;
do _n_=1 to 100;
group=2;
subjno='2'||put(_n_,z3.);
sex=choosec(rand('table',0.5,0.5),'M','F');
age=rand('integer',18,70);
output;
end;
run;
Unfortunately, The initial random seed, 12345, causes SEX statistical difference on different group, the p value of Chisq is 0.0477.
I have tried new seed value like 123, 1234, 123456, 1234567 and they will not cause SEX statistical difference on different group.
I know there is a possibility that statistical difference of covariates happens. Is there a way to ensure no statistical differences between groups in covariates when simulating data?
Maybe block randomization with covariates as block factor? What about continous covariate variable like AGE?
... View more

0
3
Starting from SAS Visual Analytics 2025.03, a new feature has been introduced that allows report designers to control data export at the report level.
This can be very useful for limiting the disclosure of private data or simply for disabling certain exports.
In previous versions, export and print permissions could only be managed globally.
With this new feature, report designers can in detail:
Disable export only when private data is present
Partially or completely disable data export, regardless of data sensitivity
Disable image export
Limit the type of export (e.g., exporting to PDF may not be allowed)
Disable export of report packages
Option to control the customized view of the report
In the Viewer Capabilities section of the report’s Options Pane, these export settings can be easily managed. You can choose between three options:
- Enable
This is the default setting - Disable if private date is present - Disable Used to limit some exports
When the export is customized, the user will be able to see it very easily because:
- the data export when disabled is grayed out with a lock icon. - the available data export will not have any icon.
How to Use This Feature
1. Create a new cumulative hierarchy to protect specific data
2. Drop the hierarchy into the canvas
3. Limit export at the report level for the end user
4. Choose to disable export based on granularity
As an end user, I am only allowed to export as an image or PDF.
The ability to export data is grayed out, and the lock icon indicates that the feature is restricted for the end user.
Conclusion
The SAS Visual Analytics 2025.03 provides report designers with granular control over data sharing, enhancing both information security and transparency for users.
By combining export restrictions and visual indicators, SAS offers a comprehensive framework to protect sensitive information in a collaborative reporting environment.
Reference to SAS Documentation
Specify Options for a Report - SAS Help Center: Using the Options Pane
Review Information Privacy Warnings in the Data Pane - SAS Help Center: Using the Data Pane
... View more

0
0
In a local environment (on the same machine), SAS can use DDE (Dynamic Data Exchange) to write data to specific cells in an existing Excel file. However, this is not possible when the SAS session is run on a remote machine. DDE alternatives, such as ODS (Output Delivery System for Excel) and SAS/ACCESS to PC Files, do not allow data to be written to specific cells in existing Excel files. We would like to see the functionality of ODS (Output Delivery System for Excel) and SAS/ACCESS to PC Files improved so that data can be output to specific cells in a sheet of an Excel file that already contains data. We have received strong requests for this function not only from our company but also from our contractors who use the environment provided by our company to perform analysis with SAS. For example, in Python, the library openpyxl can be used to write data directly into specific cells in an existing Excel file without the need for an Excel application. If this is possible in other languages, it may also be possible to implement similar functionality in SAS through alternative means. If implemented, it would enhance the value of SAS as software.
... View more

See more ideas labeled with:
0
7
Unanswered topics
These topics from the past 30 days have no replies. Can you help?
Subject | Likes | Author | Latest Post |
---|---|---|---|
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 | |||
0 |