I have a sample t distribution and for my sample I have to figure out confidence intervals along with their upper and loew bounds. I figured out the formula to determine the upper and lower bounds but when I do an if then to see what from my sample is a miss it tells me :ERROR 455-185: Data set was not specified on the DATA statement. my code looks like : %let n=20;*this is the size of each sample; %let sims=10;*this is for the outer loop that says how many times the simulation is repeated; %let df=6;*parameters needed; %let t=1.94; *t value for a ttest with a df of 6; data confidence(keep=missright missleft); set sample; lb=xbar-(t*(std/(sqrt(n)))); ub=xbar+(t*(std/(sqrt(n)))); if x < lb then output 'E:\missleft'; if x > ub then output 'E:\missright'; miss='E:\missright'+'E:\missleft'; output; end; proc print; run; for the missleft and missright is where i see the problem. How do I fix this?
... View more