BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
afgdurrani0
Pyrite | Level 9

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
Std Error

Approximate 95% Confidence
Limits

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
Std Error

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

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

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.

View solution in original post

15 REPLIES 15
afgdurrani0
Pyrite | Level 9

Do you want me to provide the data too? 

afgdurrani0
Pyrite | Level 9

Dear KurtBremser, 

You could download my data set from the below link.

https://goo.gl/EhWUV7

Best regards,

Umar

afgdurrani0
Pyrite | Level 9

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 

andreas_lds
Jade | Level 19

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.

Kurt_Bremser
Super User

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.

afgdurrani0
Pyrite | Level 9

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.0002484.89E-60.0002380.000257
1.26040.40020.46472.0562
20.77380.243520.289721.2579

 

Thanks for the help. I got my answer 🙂

Respectfully, 

Umar

Kurt_Bremser
Super User

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.

afgdurrani0
Pyrite | Level 9

Dear KurtBremser,
Do you suggest to use CSV file instead of XLSX? Thanks once again for the help.

Kurt_Bremser
Super User

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.

afgdurrani0
Pyrite | Level 9
Dear KurtBremser,
Many thanks for the detail explanations. Very kind of you.
Respectfully,
Umar
ballardw
Super User

@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

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 15 replies
  • 2040 views
  • 5 likes
  • 4 in conversation