This article describes how to compute shares from numeric data at the case (eg respondent) level. The table below shows the average number of hours spent during the week doing each of the activities:
And below is the table of the new variable created where the case-level share has been computed.
- A Displayr document containing numeric data.
- Select the numeric variable in the Data Sets tree that you would like to compute the case-level shares.
- Then go to Anything > Data > Variable(s) > New > Ready-Made New Variable(s) > Case-Level Shares. This will create a new numeric variable.
- OPTIONAL: A simpler and often better method for computing shares is to use the share statistics available in the object inspector under Inputs > STATISTICS > Cells. Generally, the shares computed when showing the Average of the variables created using this QScript will differ from those obtained if selecting one of the shares from Inputs > STATISTICS > Cell, as the Average will show the average of the shares computed at the respondent (case level), whereas the shares computed using Inputs > STATISTICS > Cell is created by summing up the data for each case and thus give greater weight to cases with larger values.