BookmarkSubscribeRSS Feed
Ariel_1
Fluorite | Level 6

I was wondering if  there  was an easy way to determine where the confidence intervals of a line intercept two lines.  

 

Example Below, I’d like to know where the confidence intervals of each line intercept 90 and 110. I'm on SAS 9.04

 

data data1;

      input lot $ age  results ;

      datalines;

      a 0 100

      a 1 101

      a 2 102

      a 3 101

      a 4 99

      a 5 101

      a 6 100

      b 0 102

      b 1 99

      b 2 104

      b 3 95

      b 4 98

      b 5 97

      b 6 104

      c 0 104

      c 1 99

      c 2 97

      c 3 102

      c 4 98

      c 5 100

      c 6 101

;

      run;

 

 

proc glm data=data1;

      class Lot;

      model results = lot age*lot/ noint  solution   ;

      output out= lsmeans lclm=lclm95  uclm=uclm95   p=p  ;

  run;     

quit;

2 REPLIES 2
PaigeMiller
Diamond | Level 26

You could do it by seeing what values of AGE result in confidence limits of 90 and 110.

 

You could augment the data set with records where AGE varies slowly from 0 to 6 (let's say by 0.01 increments) and where the Y value (RESULTS) is missing so that the record is not used in the regression. Re-run the regression. Then examine the output data set to see where the confidence limits are very close to 90 and 110.

--
Paige Miller
Ariel_1
Fluorite | Level 6

Paige - that's a very good idea.  However, I was trying to program it since I have many variables that I am looking at.  

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!

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