Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8688509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:23:07+00:00 2026-06-12T23:23:07+00:00

I have a short piece of SAS 9.3 code that outputs some Chi-squared statistics.

  • 0

I have a short piece of SAS 9.3 code that outputs some Chi-squared statistics. I’m using ods select ChiSq to select only the tables of output I need, but SAS returns this warning:

WARNING: Output ‘ChiSq’ was not created. Make sure that the output
object name, label, or path is spelled correctly. Also, verify that
the appropriate procedure options are used to produce the requested
output object. For example, verify that the NOPRINT option is not
used.

This is the code:

ods html;

data flu;
input gender treatmentcourse improvement;
datalines;
012
000
110
112
002
002
012
000
000
012
111
011
002
101
002
011
100
100
001
110
110
011
001
010
101
001
000
001
110
100
;

proc format;
value treatmentformat 0 = "minor"
                      1 = "minor"
                      2 = "major";

ods trace on;
ods select ChiSq;
proc freq data = flu order = data;
tables treatmentcourse * improvement /chisq cmh;
format treatmentcourse treatmentformat.;
run;
ods trace off;
ods select all;
ods html close;

I can clearly see as a result of ods trace on; that the ChiSq table is included in the output, but SAS ignores the ods select statement and displays all the tables.

In the datalines, the first colum is gender, 0 for males and 1 for females. The second column is 0 if the patient took the drug and 1 if the patient took the placebo. The third column is a scale of 0 – 2, 0 being no improvement in flu symptoms and 2 being much improvement.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:23:08+00:00Added an answer on June 12, 2026 at 11:23 pm

    I think your problem is that you put your custom format on the wrong variable. Try this instead:

    proc freq data = flu order = data;
       tables treatmentcourse * improvement /chisq cmh;
       format improvement treatmentformat.;
    run;
    

    If you look at your log more carefully, you should see a SAS NOTE that no statistics were created.

    UPDATE: You also should put a run; statement after your proc format step, just to be safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a short question. Im my current project I'm using LINQ-to-SQl. That is
I have a short little piece of code to play tones via Tao.Sdl. It
I have a short piece of code like this: typedef struct { double sX;
I have this short piece of code Public n As Integer Public Sub Foo()
The situation: I have a piece of code that works when compiled for 32-bits
I have a short piece of (x86) assembly that I am trying to figure
I have a piece of code that imports data into a sql table. When
Let's say I have to implement a piece of T-SQL code that must return
I have the following piece of code: typedef int AliasB; typedef unsigned short AliasA;
I have modified a short piece of pyqt code to produce real-time rendering of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.