BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
JoshuaG
Calcite | Level 5

I honestly have no clue why that is the case

PaigeMiller
Diamond | Level 26

@JoshuaG wrote:

I honestly have no clue why that is the case


SAS data set names cannot have spaces in them. They cannot have any special symbol except an underscore. They cannot begin with numbers. 

--
Paige Miller
JoshuaG
Calcite | Level 5

Thanks for clarifying. I am able to run the code now but all the graphs that are supposed to show up given the solution, are not coming up for me. 

PaigeMiller
Diamond | Level 26

You may need to turn on the graphics first, use this command before PROC REG

ods graphics on;

 

Also you have hours and score in the wrong place in the MODEL statement.

 

I never download attachments. If you need to show me output, make a screen capture and include it in your reply via the "Insert Photos" icon.

--
Paige Miller
JoshuaG
Calcite | Level 5

proc reg data = drivingclass;
model Score = Hours;
ods output anova= ANOVA;
ods output ParameterEstimates=ParameterEstimates;
run;quit;

 

Its hours = score?

PaigeMiller
Diamond | Level 26

@JoshuaG wrote:

proc reg data = drivingclass;
model Score = Hours;
ods output anova= ANOVA;
ods output ParameterEstimates=ParameterEstimates;
run;quit;

 

Its hours = score?


no, sorry, my mistake, score=hours is correct!

--
Paige Miller
JoshuaG
Calcite | Level 5

Screenshot (1153).pngScreenshot (1154).pngScreenshot (1155).pngScreenshot (1155).pngScreenshot (1156).pngScreenshot (1157).pngScreenshot (1158).png

JoshuaG
Calcite | Level 5
Examples of the graphs that are supposed to show, all I have at the moment are tables
Reeza
Super User
It's because of that ODS SELECT statement. Why do you have that included? As part of learning programming I highly recommend you comment every single line of code with what you think it's doing.
JoshuaG
Calcite | Level 5

The instructions tell me to use a ODS Select statement 

 

" Run a regression model to test the relationship between class hour (independent variable) and
performance score (dependent variable).
Use ods trace statement to generate the ANOVA table and the parameter estimates outputs only from
the regression results (Use ODS select). (You need to check the log file for the table names for
ANOVA and parameter estimates) and then save these two tables into SAS data using the following
commands"

Reeza
Super User

ODS SELECT limits the output to only the desired tables, which according to your instructions are Anova and ParameterEstimates. 
When you do that you cannot see the other output including the graphs. So SAS isn't showing other output such as graphs because you've told it to do that. 

 

If you want to see all output but save Anova and ParameterEstimates tables use the ODS OUTPUT statements to save the tables. 


ODS TRACE ON/OFF is used to figure out the table names.

ODS SELECT/EXCLUDE controls what is displayed as output.

ODS OUTPUT saves the output indicated to a data set name. 

 

 

JoshuaG
Calcite | Level 5

Thank you so much! Just to confirm, I should be good with what the directions are telling me to do? I am about to email my professor just to make sure as well.

Reeza
Super User
According to the instructions your ODS SELECT statement is wrong, not sure what they're expecting though.
JoshuaG
Calcite | Level 5

What should my ods select statement be then?

Reeza
Super User

Read the instructions again to see what it states and which tables should be displayed. You know the syntax so it's figuring out the instructions/tables now. 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 39 replies
  • 2078 views
  • 1 like
  • 6 in conversation