27.06.2013 Views

Mostreig Estadístic: problemes i pràctiques - Dipòsit Digital de la UB

Mostreig Estadístic: problemes i pràctiques - Dipòsit Digital de la UB

Mostreig Estadístic: problemes i pràctiques - Dipòsit Digital de la UB

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Mostreig</strong> <strong>Estadístic</strong>: <strong>problemes</strong> i <strong>pràctiques</strong><br />

3. L’extracció <strong>de</strong> <strong>la</strong> mostra:<br />

78<br />

Les funcions necessàries per a extraure <strong>la</strong> mostra no s’inclouen als paquets base d’R. Així,<br />

caldrà instal·<strong>la</strong>r el paquet sampling i carregar-lo.<br />

a) Funcions strata() i getdata(), per al mostreig aleatori simple i estratificat.<br />

La sintaxi bàsica <strong>de</strong> les funcions és <strong>la</strong> següent:<br />

nom = strata(base_da<strong>de</strong>s, stratanames=c(“variable”),<br />

size=n, method=”srswor”, <strong>de</strong>scription=T)<br />

mostra

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

Saved successfully!

Ooh no, something went wrong!