This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
help:data_structure [2015/03/29 01:04] admin |
help:data_structure [2015/03/29 01:54] (current) admin [Getting your Data Structure Right for SOFA] |
||
---|---|---|---|
Line 1: | Line 1: | ||
[[http://www.sofastatistics.com/userguide.php | Contents]] | [[http://www.sofastatistics.com/userguide.php | Contents]] | ||
- | ====== Getting your Data Structure Right for SOFA ====== | + | ====== Getting your data structure right for SOFA ====== |
===== Data Format ===== | ===== Data Format ===== | ||
Line 22: | Line 22: | ||
{{:help:group_diffs_data_example.jpg|}} | {{:help:group_diffs_data_example.jpg|}} | ||
- | The By variable must be a single variable with different values in it, not one column per option. E.g. | + | The By variable must be a single variable with different values in it (long format), not one column per option (wide format). See [[http://www.theanalysisfactor.com/wide-and-long-data/|]]. |
+ | |||
+ | E.g. | ||
== By Gender == | == By Gender == | ||
Line 79: | Line 81: | ||
==== Restructuring your data ==== | ==== Restructuring your data ==== | ||
- | The most common problem is when your data has the data for different groups in different variables. | + | The most common problem is when your data has the data for different groups in different variables. The easiest way to handle this might be to change the data in a spreadsheet and import it in the restructured form. |
- | + | ||
- | E.g. score data for three years: | + | |
- | + | ||
- | 2014 Female | + | |
- | 186 167 | + | |
- | 179 170 | + | |
- | ... | + | |
- | + | ||
- | The easiest way to handle this might be to change the data in a spreadsheet and import it in the restructured form. | + | |
- | + | ||
- | - Insert group by column\\ {{:help:insert_group_by_column.jpg|}} | + | |
- | - Transfer first variable (Male) by renaming it to the measure (Height) and populating the group by column (Gender) for that variable\\ {{:help:first_var_into_group_by_col.jpg|}} | + | |
- | - Transfer second variable by pasting height values below and completing the Gender column with the variable (Female)\\ {{:help:second_var_into_group_by_col.jpg|}} | + | |
- | - Delete the variable not needed (Female in this case) | + | |
- | + | ||
- | NB You could have used 1 for Male and 2 for Female if you preferred and added value labels to Gender once the data was imported into SOFA Statistics. See [[help:variable_details | Setting variable details e.g. labels]] | + | |
- | + | ||
- | The same process can be used if there are multiple groups e.g. countries instead of genders. | + | |
===== Numbers stored in a text variable ===== | ===== Numbers stored in a text variable ===== |