| Date: | Wed, 16 Jun 2010 11:10:00 -0400 |
| Reply-To: | "Remillard, Nancybelle" <nremilla@INDIANA.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Remillard, Nancybelle" <nremilla@INDIANA.EDU> |
| Subject: | Converting SPSS ctables to SAS |
| Content-Type: | text/plain; charset="us-ascii" |
We are converting SPSS to SAS. In SPSS when I run:
OMS
/SELECT TABLES
/IF SUBTYPES=['Custom Table']
/DESTINATION FORMAT=html OUTFILE='X:\ \temp_html_files\currentdata1_1.html'.
ctables / table webapp [c] by apply [c] /CATEGORIES VARIABLES=webapp apply ORDER=A KEY=VALUE EMPTY=INCLUDE TOTAL=YES POSITION=AFTER .
omsend.
I get the following, which is exactly what I need. I've tried many different proc routines and haven't been able to replicate the table produced by spss.
apply
no
yes
Total
Count
Count
Count
webapp
no
0
1877
1877
yes
0
34198
34198
Total
0
36075
36075
In SAS the closest I can get is with Proc Freq - which I could live with if it weren't for the missing 'No' column. If someone could help me figure out how to force that 'No' column with a 0 count, I sure would appreciate it.
ODS HTML FILE ='x:\temp\currentdata1_1.html';
PROC FREQ DATA = &curyear ;
TABLES webapp * apply / NOPERCENT NOCOL NOROW MISSING;
FORMAT webapp webapp. apply apply.;
TITLE ;
RUN;
ODS HTML CLOSE;
The FREQ Procedure
Frequency
Table of webapp by apply
webapp
apply
Yes
Total
No
1877
1877
Yes
34200
34200
Total
36077
36077
Thank you,
Nancy
Nancy Remillard
Analyst/Programmer
Indiana University
Office of Enrollment Planning and Research
400 North Sunrise Drive
Weatherly Hall 308
Bloomington, IN 47405
812-856-0478
CONFIDENTIALITY NOTICE
This email message, including all attachments, is for the sole use of the intended recipients and may contain confidential and privileged information. If you are not the intended recipient, you may NOT use, disclose, copy or disseminate this information. Please contact the sender by reply email and immediately destroy all copies of the original message including all attachments. Even if you are the intended recipient of this email, the author requests that you not forward it to any other person without prior consent.
|