01.03.2013 Views

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

Applied Statistics Using SPSS, STATISTICA, MATLAB and R

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2 Estimating a Mean 91<br />

Figure 3.5. Selection of cases: a) Partial view of <strong>STATISTICA</strong> “Case Selection<br />

Conditions” window; b) Partial view of <strong>SPSS</strong> “Select Cases” window.<br />

In <strong>MATLAB</strong> one may select a submatrix of matrix x based on a particular<br />

value, a, of a column i using the construction x(x(:,i)==a,:). For instance,<br />

assuming the first column of cork contains the classifications of the cork<br />

stoppers, c = cork(cork(:,1)==1,:) will retrieve the submatrix of cork<br />

corresponding to the first 50 cases of class 1. Other relational operators can be used<br />

instead of the equality operator “== ” . (Attention: “= ” is an assignment operator,<br />

an equality operator.) For instance, c = cork(cork(:,1)> filter = round(unifrnd(0,1,150,1));<br />

>> fcork = cork(filter==1,:);<br />

> filter fcork

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!