We are two friends, I use SAS University Edition while my other friend who is away from me using SAS desktop version (I think 9.04). We both run same SAS formula on the same data but we get different results!
SAS desktop
Parameter | Estimate | Approx | Approximate 95% Confidence | |
RLT | 0.000248 | 4.89E-6 | 0.000238 | 0.000257 |
B | 1.2604 | 0.4002 | 0.4647 | 2.0562 |
TU | 20.7738 | 0.2435 | 20.2897 | 21.2579 |
SAS University Edition
Parameter | Estimate | Approx | Approximate 95% Confidence Limits | |
RLT | 0.000247 | 4.772E-6 | 0.000238 | 0.000257 |
B | 1.3672 | 0.4617 | 0.4492 | 2.2852 |
TU | 20.7152 | 0.2387 | 20.2405 | 21.1899 |
Though the changes might seem small to some, but for us it is a big issue since it affects our whole calculation. See the attached files for details.
Thanks for the help in advanced.
Respectfully,
Umar
Take the time and read my post thoroughly:
"Excel files are useless for representing SAS datasets."
Use the macro in my footnotes to convert both of your SAS datasets to data steps and compare them. Or proc cport/cimport a dataset from one environment to the other, so you can run a proc compare on them (recommended). Do NEVER think that proc import from Excel can produce consistent results; it can't.
And your statement ("it is one of the best methods to import data to SAS") is hilarious at best. Several 100 years of combined SAS experience of the Super Users/Proc Stars here can tell you otherwise.
Please post the source dataset in a data step with datalines.
Do you want me to provide the data too?
Dear KurtBremser,
You could download my data set from the below link.
Best regards,
Umar
DATA STEP with DATALINES. Excel files are useless for representing SAS datasets. And the guessing of proc import could be influenced by the environment.
Dear KurtBremser,
We both import data (either to SAS University Edition or SAS desktop) via excel file.
And please don't say that Excel is useless, it is one of the best methods to import data to SAS since we are working on too many data observations and writing them directly into SAS as dataset etc. will take too much time.
Respectfully,
Umar
Excel is the worst file-format to store data: it has no data-types, no naming rules for columns, you often don't see the data at all, but an "optimized" representation and Excel even does not inform that it has removed leading zeros - to name just one of its crappy attitudes.
Switching to csv and stopping Windows from opening csv-files with excel will give you full control of the import process.
Take the time and read my post thoroughly:
"Excel files are useless for representing SAS datasets."
Use the macro in my footnotes to convert both of your SAS datasets to data steps and compare them. Or proc cport/cimport a dataset from one environment to the other, so you can run a proc compare on them (recommended). Do NEVER think that proc import from Excel can produce consistent results; it can't.
And your statement ("it is one of the best methods to import data to SAS") is hilarious at best. Several 100 years of combined SAS experience of the Super Users/Proc Stars here can tell you otherwise.
Dear KurtBremser,
Using CSV file, I also got a similar results similar to my friend who is also using CSV. I often import data to SAS University Edition via XLSX format.
Parameter Estimate ApproxStd Error Approximate 95% Confidence LimitsRLTBTU
0.000248 | 4.89E-6 | 0.000238 | 0.000257 |
1.2604 | 0.4002 | 0.4647 | 2.0562 |
20.7738 | 0.2435 | 20.2897 | 21.2579 |
Thanks for the help. I got my answer 🙂
Respectfully,
Umar
And mind: I'm NOT saying you are not up to something here. But to verify that you have really found a difference in the behaviour of SAS on different platforms, you have to make positively sure it's not in the data. In the SAS data.
Dear KurtBremser,
Do you suggest to use CSV file instead of XLSX? Thanks once again for the help.
Absolutely. With csv, you do not have to rely on the "black box" approach of either libname Excel/xlsx/... or proc import, where you have no control over and can't see what's going on behind the scenes.
Even if you use proc import with a csv, you can see the data step created by it in the log, and review it and/or adapt it to your needs.
We all prefer text files (csv, or delimited with other delimiters, or with fixed-space columns) as the means to move external data into SAS (unless you work with a direct connection to a database with SAS/ACCESS to RDBMS). Once a data step has been written for a given file layout, it will consistently import that file, and if the layout changes, you'll get ERROR messages in the log that alert you to that fact.
There are several Maxims that are pertinent to this kind of problems:
#22
#31
#27
@afgdurrani0 wrote:
Dear KurtBremser,
We both import data (either to SAS University Edition or SAS desktop) via excel file.
And please don't say that Excel is useless, it is one of the best methods to import data to SAS since we are working on too many data observations and writing them directly into SAS as dataset etc. will take too much time.
Respectfully,
Umar
Search this forum using the terms: Excel Import Problem
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: