Questions tagged [sas-studio]

SAS Studio is a SAS thin client that runs in a web browser and allows a user to connect to a SAS server and execute SAS code. It is the client that is used to run the SAS University Edition free software, as well as many paid SAS products.

SAS Studio is a SAS thin client that runs in a web browser and allows a user to connect to a SAS server and execute SAS code. It is the client that is used to run the SAS University Edition free software, as well as many paid SAS products.

http://support.sas.com/software/products/sasstudio/

http://support.sas.com/software/products/university-edition/faq/main.htm

100 questions
0
votes
1 answer

Only output the ROC curve in SAS

I am looking to create a pdf with 4 nice graphs for different analysis. My question is, how do I output only the ROC curve for my logistic regression? I use the following code TITLE2 JUSTIFY=CENTER "Rank ordering characteristic curve…
0
votes
1 answer

proc logistic output whether the fitted model predicted a 1 or 0

I am taking a dataset which replicates the below DATA HAVE (DROP=I); DO I = 1 TO 100; Y = RAND("Integer",0,1); X1 = I ** RANUNI(I); X2 = I ** I ** RANUNI(I); output; END; RUN; And I fit a logistic…
78282219
  • 159
  • 1
  • 12
0
votes
1 answer

proc stdize producing wrong value for percentiles

I have a dataset like so data test; do i = 1 to 100; x1 = ceil(ranuni(0) * 100); x2 = floor(ranuni(0) * 1600); x3 = ceil(ranuni(0) * 1500); x4 = ceil(ranuni(0) * 1100); x5 = floor(ranuni(0) * 10); output; …
78282219
  • 159
  • 1
  • 12
0
votes
4 answers

The advantages of defining macro variables outside the macro function

I have a stubborn lecturer who insists that defining all macro variables inside the parenthesis of the macro statement like this %MACRO TEST(Var1= , Var2= , Var3= ); What are the advantages of this? What are the advantages of actually defining your…
0
votes
0 answers

left join on first two words in a string using comma delimiter SAS

I have a dataset and a dictionary like such data have_data; input y x_1; datalines; 1 10 2 20 3 30 ; run; data have_dictionary; input ID label; datalines; X_1 Assets ; run; I then transform my above dataset to create log and squared transforms of…
0
votes
1 answer

SAS to Excel DDE produces test but not output data

I've been following documentation online and browsing other stack overflow queries but I have not yet been able to find a way to output my SAS dataset to excel via DDE. The version of SAS I am running is SAS9.4 The version of excel I am running is…
user5572129
0
votes
1 answer

What is the correct order for Somers' D when using PROC FREQ

I am looking to produce the Somers' D using Proc Freq using the following code: DATA HAVE; DO I = 1 TO 1000; Y = RANUNI(0); X = RANUNI(1) * 10; OUTPUT; END; RUN; PROC FREQ DATA=have NOPRINT; …
user5572129
0
votes
1 answer

SAS: dataset name Remove the date and replace with the current date

I currently have a macro which moves my dataset from one branch to another. In each movement, the date is updated. However, I am having trouble with removing the old date autonomously before inputting the new date, any advice? The code is: %Macro…
user5572129
0
votes
1 answer

SAS not picking up years in loop

I am working with the following dataset data have; input repricingdate1-repricingdate3; datalines; '30SEP2019'd '31DEC2020'd '31MAR2022'd '31DEC2020'd '30JUN2023'd '31DEC2025'd ; run; please excuse me if that's not the correct…
78282219
  • 593
  • 5
  • 21
0
votes
2 answers

How to change from annual year end to annual mid year in SAS

I currently work in SAS and utilise arrays in this way: Data Test; input Payment2018-Payment2021; datalines; 10 10 10 10 20 20 20 20 30 30 30 30 ; run; In my opinion this automatically assumes a limit, either the start of the year or the end of…
78282219
  • 593
  • 5
  • 21
0
votes
1 answer

SAS: Interesting Excel Import discrepancy

I'm importing a file from excel which looks like this: Row Col Bucket 1 2 01 2 2 00 %Macro ImportExcel(DF = , OF = , Type = , SheetName = ); proc import datafile = &DF out = &OF dbms = &Type replace; sheet =…
78282219
  • 593
  • 5
  • 21
0
votes
1 answer

Prime Factorisation Loop in SAS

I am working on little tasks to improve my coding and efficiency, the problem I'm working on today is from project Euler, problem 3: "Find the largest Prime of 600851475143" the code I have written is: data test; a = 600851475143; /*The subsequent…
78282219
  • 593
  • 5
  • 21
0
votes
1 answer

Dynamic Length macro

I have a project in which I often merge datasets by using data and set i.e. data want; set have1 have2; run; The problem is, these datasets are often the same but the observations have different lengths and truncation of the data occurs. So I am…
78282219
  • 593
  • 5
  • 21
0
votes
1 answer

How to unzip a file via SAS (via SAS Studio / SSOD)

I'm trying to decompress a file in the zip format using pure SAS code, that I can integrate as one of the steps of a SAS script. I'm running SAS via the web version of SAS Studio on the cloud hosted version (SSOD). Reading the documentation, I was…
TheYeti
  • 1
  • 3
0
votes
1 answer

SAS Placeholder value

I am looking to have a flexible importing structure into my SAS code. The import table from excel looks like this: data have; input Fixed_or_Floating $ asset_or_liability $ Base_rate_new; datalines; FIX A 10 FIX L Average Maturity FLT A 20 FLT L…
78282219
  • 593
  • 5
  • 21