BookmarkSubscribeRSS Feed
kcmitche
Calcite | Level 5

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;

5 REPLIES 5
kcmitche
Calcite | Level 5
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;
LinusH
Tourmaline | Level 20

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
kcmitche
Calcite | Level 5

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.

Reeza
Super User

@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...

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

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
  • 5 replies
  • 985 views
  • 1 like
  • 4 in conversation