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;
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 - that's a very good idea. However, I was trying to program it since I have many variables that I am looking at.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.