BookmarkSubscribeRSS Feed
DShah
Fluorite | Level 6

Hi I have a dataset (refer attached image). I have imported this data in SAS and want a procedure to determine a slope value (T vs Cn) for 3 samples. As shown in the imagefile. Can you please help me in achieving this.

 

Thank you in advance.

 


11.JPG
4 REPLIES 4
Reeza
Super User

1. Create a grouping variable that allows you to group observations. 

Use SUBSTR() function to extract a portion of a string variable, I think Sample in this case.

2. Sort the data explicitly by the variable in part 1. PROC SORT.

3. Run a PROC REG to determine the slope variables. Use OUTEST on PROC REG statement to store the estimated slopes per group into a data set that can then be merged into your previous data set.

 

PS. If you want help with code, provide sample data as text, not as an image. To generate code for you, that actually worked, would require typing out your data. On principle I generally don't do that anymore and many others don't either. 

 

If you require further assistance post the code you've developed and the log indicating where you're having issues. 

 

You can find how to instructional videos on various topics here:

http://support.sas.com/training/tutorial/

 

DShah
Fluorite | Level 6

Thank you for your reply. I do not know how to write a code. please find data as in attached CSV file:

Reeza
Super User

I'm assuming that you'd like to try and write the code at some point. If not, use the GUI to point and click your selections. 

 

 

DShah
Fluorite | Level 6

i have very limited application for this software. I will be very grateful if you will write a code for me.

Thank you in advance

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 1145 views
  • 0 likes
  • 2 in conversation