another set of questions about SAS
Quiz yourself by thinking what should be in
each of the black spaces below before clicking
on it to display the answer.
Help!
|
|
||||
---|---|---|---|---|---|
Quel est Tab3 dans Data Tab3; set Tab1 Tab2; by X; | Pour chaque valeur de X, on met d'abord les observations de Tab1 puis les observations de Tab2 dans Tab3. Tab1 et Tab2 devaient être triés.
🗑
|
||||
Que signifie les parenthèses dans Proc means; var z; class x y; types x*y (); | Cela permet d'obtenir la moyenne de Z pour la population totale.
🗑
|
||||
Quel est le résultat de : Data Tab; x=8; data Tab2; a=1; set tab point=a; stop; | Tab2 ne contient aucune observation, car nous n'avons pas écrit la commande output, qui est alors rajoutée par SAS après le stop, et qui ne sert donc à rien.
🗑
|
||||
Que donne le format Proc format; picture other='alpha 099 beta'; pour la valeur 6? | 06 beta
Tout ce qui est écrit avant le premier digit selector n'est pas pris en compte.
🗑
|
||||
Que vaut y dans tab2 ? Data tab; x='variable'; data tab2; length y $ 3; set tab; y=x; | y vaut 'var'. La longueur d'une variable est fixée à sa première apparition, ici trois pour y, et n'est pas dynamique.
🗑
|
||||
Que donne Data tab; x='M'; data tab2; set tab; if x='m'; | Tab2 est vide car les valeurs sont sensibles à la casse.
🗑
|
||||
Faites un histogramme sur la variable z d'un tableau tab. | Proc gchart;
vbar z;
🗑
|
||||
Comment ajouter le label "labelx" à la variable x d'un tableau Tab ayant un million d'observations | Proc datasets;
modify tab;
label x="labelx";
La solution data tab; set tab; label x="labelx";
parcourt toutes les observations et est donc à éviter.
🗑
|
||||
Un tableau Tab a des labels sur ses variables. Comment modifier la valeur de Y à 6 pour toutes les observation vérifiant x>4 ? | Data tab;
modify tab;
if x>4 then y=6;
La commande modify permet de garder tous les attributs du tableau et donc de garder les labels. Par contre nous n'aurions pu ainsi rajouter une variable.
🗑
|
Review the information in the table. When you are ready to quiz yourself you can hide individual columns or the entire table. Then you can click on the empty cells to reveal the answer. Try to recall what will be displayed before clicking the empty cell.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
To hide a column, click on the column name.
To hide the entire table, click on the "Hide All" button.
You may also shuffle the rows of the table by clicking on the "Shuffle" button.
Or sort by any of the columns using the down arrow next to any column heading.
If you know all the data on any row, you can temporarily remove it by tapping the trash can to the right of the row.
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.
Normal Size Small Size show me how
Normal Size Small Size show me how
Created by:
ocouronne
Popular Computers sets