DATA Step, Macro, Functions and more

Help me with an assignment

Reply
Occasional Contributor
Posts: 13

Help me with an assignment

Hello Community. I have a quick question to ask the community. I have a data set (attached below) I'm trying to answer a few questions. i need to write code to help answer a few questions.  I need to identify the top 5 player_name and team_name that had offensive rebounds ('O' in the event_desc_id) that led to a 3FGA, 3FGM, 2FGA, directly after (row below) Thank you for any help.  Let me know if you don't understand I'll try and make it easier . So far the only coding i have is  proc import datafile="/home/kcmitche/DataChallengeEuroGamePBP-2.csv"  out=EuroBB dbms=csv replace;  run;

Occasional Contributor
Posts: 13

Help me with an assignment

Hello Community. I have a quick question to ask the community. I have a data set (attached below) I'm trying to answer a few questions. i need to write code to help answer a few questions.  I need to identify the top 5 player_name and team_name that had offensive rebounds ('O' in the event_desc_id) that led to a 3FGA, 3FGM, 2FGA, directly after (row below) Thank you for any help.  Let me know if you don't understand I'll try and make it easier . So far the only coding i have is  proc import datafile="/home/kcmitche/DataChallengeEuroGamePBP-2.csv"  out=EuroBB dbms=csv replace;  run;
Super User
Posts: 5,441

Re: Help me with an assignment

So do I understand correctly that you are taking SAS training, and now you want someone else to write your code? Then you'll learn nothing more than if you just read documentation without context.

Your training facility is the ones that should guide you in your assignments.

Data never sleeps
Occasional Contributor
Posts: 13

Re: Help me with an assignment

It's an online teach you SAS g. Not a facility.

 

I'm not looking for someone to write out my specific code.

but show me where i should even be looking

 

I know i need to start by making a table 

and then identify how many times each variable is in a row and then who's row it is in.

I' having trouble figuring out the more complex part where i need to use the rows after what I am checking based on criteria.

I've never worked with criteria based analytics.

Super User
Posts: 19,873

Re: Help me with an assignment


kcmitche wrote:

It's an online teach you SAS g. Not a facility.

 

I'm not looking for someone to write out my specific code.

but show me where i should even be looking

 

I know i need to start by making a table 

and then identify how many times each variable is in a row and then who's row it is in.

I' having trouble figuring out the more complex part where i need to use the rows after what I am checking based on criteria.

I've never worked with criteria based analytics.


You haven't posted enough for us to even point in a direction right now. You're using terms that I'm sure make perfect sense to you but don't to us. 

 

So far the responses have more details that your question. The import step that you've shown only brings in your data but doesn't provide any useful information.

 

https://communities.sas.com/t5/SAS-Communities-Library/How-to-ask-a-question-in-SAS-Analytics-U-Comm...

Super User
Super User
Posts: 7,997

Re: Help me with an assignment

I agree with @LinusH, writing it yourself is the way to learn.   Just to add to this, learning how to post a good question will also help you get good answers.  Attaching files for your data is one bad way to start.  Files from the internet are security risks and wouldn't be downloaded.  Post test data in the form of a datastep in the post itself:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 

Also, just looking at the small bit of code you have there I see a lack of understanding with your data.  You have a proc import filetype=csv, CSV stands for Comma Separated Variable file - nothing to do with Excel even though Excel does include a parser which can open that filetype.  So the file you attach does not match your import step.  Secondly proc import is a guessing procedure, i.e. it tried to examine the file and guess the best import structure, i.e. should this variable be character/numeric etc.  Not a good idea in any situation

Ask a Question
Discussion stats
  • 5 replies
  • 194 views
  • 1 like
  • 4 in conversation