71 Answered Questions for the topic SAS
06/27/23
Which statistical analysis should I run?
Thank you! I am struggling with settling on what the best approach to my test design to choose. My initial inclination is to run a two-way repeated ANOVA. I have two dependent variables measured at...
more
Sas Statistics
12/14/22
Graphing a linear relationship with a categorical variable
Should a bar graph or a box plot be used if the group variable or the y variable is categorical and the dependent variable or outcome is continuous?
Sas Statistics
06/01/22
glimmix dist=lognormal vs autoreg
I am working with time series data in SAS proc glimmix. When I change the dist=lognormal, the models fit much better. My question is, would this be an acceptable approach vs autoreg? From my...
more
Sas
03/03/22
Stop SAS from creating files when prompted an error
Hi Team,How to stop SAS program before it creates the output files when there is an error. Options errorabend does not stop it from creating the files, is there is any other options to overcome...
more
Sas
05/18/21
SAS Excel Issue
Hello,I need help with SAS. I have an excel file that I am trying to import directly into SAS; however, it doesn't seem to want to work. I have tried changing the excel file type to no avail. I...
more
Sas Type Conversion
04/28/19
SAS : Convert character to numeric without creating another variable?
I want to convert `x` to numeric.
DATA test;
input x $1.;
cards;
1
2
0
;
run;
I tried different ways :
- With `*1` :
/* trial1 */
DATA test1;
SET test;
x = x*1;
run;
The log...
more
Sas Enterprise Guide
04/28/19
How to call one macro program from another in SAS Enterprise Guide?
Is there any macro command that allows calling one program from another (the `%run_program()` pseudo code)?
Program "Settings":
%let myvar="HELLO WORLD!";
Program "Program":
...
more
Sorting an almost sorted dataset in SAS?
I have a large dataset in SAS which I know is almost sorted; I know the first and second levels are sorted, but the third level is not. Furthermore, the first and second levels contain a large...
more
Sas Sql
04/27/19
Join overlapping date ranges?
I need to join table A and table B to create table C.
Table A and Table B store status flags for the IDs. The status flags (A_Flag and B_Flag) can change from time to time, so one ID can contain...
more
Sas
04/26/19
SAS: rearrange field order in data step?
In SAS 9, how can I in a simple data step, rearrange the order the field.
Data set2;
/*Something probably goes here*/
set set1;
run;
So if set1 has the following fields:
Name Title Salary
...
more
Sas
04/25/19
What are the features of SAS?
Sas
04/24/19
Treat missing values as zero in SAS where clause?
Is there an equivalent of the Oracle NVL function in SAS?
For example, if I have a where clause in SAS that says:
where myVar > -2;
it is not going to include any rows that have myVar =...
more
Sas
04/23/19
Opening SAS datasets for viewing from within a .sas program?
Is there a way to open a SAS dataset for viewing (i.e., in the "ViewTable" window) from within a .sas file?
04/23/19
How to remove duplicated records\\observations WITHOUT sorting in SAS?
I wonder if there is a way to unduplicate records **WITHOUT** sorting?Sometimes, I want to keep original order and just want to remove duplicated records.
Is it possible?
BTW, below are what I...
more
Sas
04/23/19
In SAS, what is the difference between Proc Means And Proc Summary?
What exactly is the difference between Proc Means and Proc Summary? Many sites state that both these are same, but unless each has something unique will SAS create it?
Sas Sas Macro
04/22/19
For in loop equivalent in SAS 9.3?
I'm searching for a while an equivalent of the ***for in* loop** (like in [Python][1] or in R) in SAS 9.3 macro language. The [DO loop][2] seem's to be the solution but did't work exactly as I...
more
Sas Sas Macro
04/22/19
Is it possible to loop over SAS datasets?
I have 60 sas datasets that contain data on consumers individual characteristics such as `id, gender, age, amountSpent, ....` Each dataset shows data only for one time period (data1 is Jan, data2...
more
Sas
04/22/19
Quit vs Run statements in SAS?
In SAS, what is the difference between 'quit' and 'run'? statements? I cannot figure out when to use 'quit' and when to use 'run'? For example, why is `proc datasets` using `quit` but `proc...
more
Sas Sas Macro
04/22/19
Changing Value of Macro Variable inside SAS macro?
I am defining a macro variable inside a macro. Then, I am feeding it into a second macro. Inside macro2 counter changes value to 200. However, when I check what is inside the macro variable that I...
more
Sas
04/21/19
How to delete blank observations in a data set in SAS?
I want to delete ALL blank observations from a data set.
I only know how to get rid of blanks from one variable:
data a;
set data(where=(var1 ne .)) ;
run;
Here I set a new data set without...
more
Sas
04/21/19
In SAS, what are good techniques/options for catching syntax errors?
In the enhanced editor, the coloring might give you a hint. However, on the mainframe I don't believe there is anything, in the editor, that will help you.
I use
OPTIONS OBS=0 noreplace;
The...
more
Sas Enterprise Guide
04/20/19
Open SAS .egp file to view code witout having SAS installed?
is there any solution to open SAS .egp file without having SAS installed on my pc? i need to open project.egp to check my old code but i dont have SAS anymore so is there any other way to do that?
sas informat datetime?
Can anyone advise on the appropriate SAS informat to read in a datetime (dd/mm/yyyy hh:mm) ???
eg
data _null_;
informat from_dt datetime????.;
input from_dt ;
put from_dt=;
cards;
...
more
04/20/19
Do I need to call rollback if I never commit?
I am connecting to a SQL Server using no autocommit. If everything is successful, I call commit. Otherwise, I just exit. Do I need to explicitly call rollback, or will it be rolled back...
more
Still looking for help? Get the right answer, fast.
Ask a question for free
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Find an Online Tutor Now
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.