I have some preliminary data where two observers, b1 and b2, have measured 5 separate items within 3 units:
All iems are different. The theoretical value is 0.559 and I can test this with a t-test:
Howver this loses any information about the possible effects of operator and unit.
My question is how can I do this comparison allowing for operator and unit? I have considered using mixed but I cannot work out how to do it, even if it is possible.
Any advice gratefully received.
Janet
Code:
* Example generated by -dataex-. For more info, type help dataex clear input int index byte(unit item) double(b1 b2) 91 1 1 .51141 .50781 92 1 2 .52398 .49874 93 1 3 .52274 .48599000000000003 94 1 4 .5357799999999999 .51203 95 1 5 .50126 .52739 96 2 1 .47135000000000005 .43428 97 2 2 .49545999999999996 .49432 98 2 3 .45694999999999997 .51216 99 2 4 .49063999999999997 .49387000000000003 100 2 5 .46132 .43951999999999997 101 3 1 .3817 .39603 102 3 2 .36210000000000003 .36173 103 3 3 .45926999999999996 .45946 104 3 4 .36511 .42478 105 3 5 .36238 .39148 end
Code:
Sorted by: . reshape long b, i(index) j(operator) (j = 1 2) Data Wide -> Long ----------------------------------------------------------------------------- Number of observations 15 -> 30 Number of variables 5 -> 5 j variable (2 values) -> operator xij variables: b1 b2 -> b ----------------------------------------------------------------------------- . ttest b = 0.559 One-sample t test ------------------------------------------------------------------------------ Variable | Obs Mean Std. err. Std. dev. [95% conf. interval] ---------+-------------------------------------------------------------------- b | 30 .461368 .0102928 .056376 .4403168 .4824192 ------------------------------------------------------------------------------ mean = mean(b) t = -9.4855 H0: mean = 0.559 Degrees of freedom = 29 Ha: mean < 0.559 Ha: mean != 0.559 Ha: mean > 0.559 Pr(T < t) = 0.0000 Pr(|T| > |t|) = 0.0000 Pr(T > t) = 1.0000
My question is how can I do this comparison allowing for operator and unit? I have considered using mixed but I cannot work out how to do it, even if it is possible.
Any advice gratefully received.
Janet
Comment