data have; input sex $ age; cards; M 45 F 50 U 60 ; data mc; set have; array s(5,2); do i = 1 to 5; do j = 1 to 2; s(i,j) = age + i + j; end; end; array mx(2); array sx(2); do k = 1 to 2; mx(k) = mean(of s(*,k)); sx(k) = std(of s(*,k); end; run; Desired output: _N_ = 1 mx1 = mean(of (47,48,48,49,49)) = 48.2, similary for mx2 sx1 = std(of (47,48,48,49,49)) = 0.84, similary for sx2 _N_ = 2 mx1 = mean(of (52,53,53,54,54)) = 53.2, similary for mx2 sx1 = std(of (52,53,53,54,54)) = 0.84, similarly for sx2 _N_ = 3 etc. Instead I get the following syntax error. 21 mx(k) = mean(of (s(*,k)); - 22 76 ERROR 22-322: Syntax error, expecting one of the following: ), ], }. Martin
... View more