User Tools

Site Tools


help:data_structure

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
help:data_structure [2015/03/29 00:37]
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 ==
 +
 +The long format is good and the wide format is bad for this purpose.
 +
 +{{:​help:​gender_long_format.png?​nolink |}}
 +
 +{{:​help:​gender_wide_format.png?​nolink |}}
 +
 +== By Year ==
 +
 +Once again, the long format is good and the wide format is bad.
 +
 +{{:​help:​years_long_form.png?​nolink |}}
 +
 +{{:​help:​years_wide_form.png?​nolink |}}
  
 === Relationships between two different variables === === Relationships between two different variables ===
Line 64: 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 =====
help/data_structure.1427603824.txt.gz · Last modified: 2015/03/29 00:37 by admin