BookmarkSubscribeRSS Feed
arsinha
Fluorite | Level 6
I have the following data for Multiple Linear Regression analysis. I need to write the data into SAS. One way would be to attach each values of Y to each X values. that is for four same values of X we have different Y values. I just think there should be a way to record the y data as vectors that correspond to each X values. Since I need to plot this afterwards what problems may I face?
 
Dosage (X)       Brain Activity (Y)
2.5                    7.5 9.5 8.0 8.5
5.0                  11.0 12.0 9.0 10.0
7.5                  11.0 16.0 12.5 14.0 
10.0                16.5 14.5 21.5 19.
 
Thank You,
Arnoneel Sinha .
2 REPLIES 2
Reeza
Super User

Homework or a new ID?

 

https://communities.sas.com/t5/SAS-Programming/Plotting-several-values-for-an-dependent-variable-vrs...

 

BallardW solution shows how to read the data in and to do the regression. 
If you want an indicator for the measurements, don't drop the I variable as in that data.

 


@arsinha wrote:
I have the following data for Multiple Linear Regression analysis. I need to write the data into SAS. One way would be to attach each values of Y to each X values. that is for four same values of X we have different Y values. I just think there should be a way to record the y data as vectors that correspond to each X values. Since I need to plot this afterwards what problems may I face?
 
Dosage (X)       Brain Activity (Y)
2.5                    7.5 9.5 8.0 8.5
5.0                  11.0 12.0 9.0 10.0
7.5                  11.0 16.0 12.5 14.0 
10.0                16.5 14.5 21.5 19.
 
Thank You,
Arnoneel Sinha .

 

PaigeMiller
Diamond | Level 26

This seems to be the 2nd time I have seen this data set, in which case I provided the code to read in the data at

 

See message 3 of this thread: https://communities.sas.com/t5/SAS-Programming/Plotting-several-values-for-an-dependent-variable-vrs...

--
Paige Miller

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 676 views
  • 0 likes
  • 3 in conversation