Select menu: Spread | Manipulate | Expand
Use this to create spreadsheets where the rows in the current spreadsheet are replicated the number of times specified in a weight column.
- From the menu select Spread | Manipulate | Expand.
- Set options as required then click OK.
If values within the weight column are not integers the values will be rounded to the nearest integer. If a weight value is less than zero or a missing value then no copies of that row will appear in the new spreadsheet. If a weight value is zero, then rows will only be copied if the Keep rows with zero weight option is selected. This menu is useful for when an analysis does not have a WEIGHTS option, and the data have been supplied in a weighted format. You can then use the expanded spreadsheet to perform the equivalent of the weighted analysis.
The CALCULATE function NEXPAND can be used to expand a data column in command mode. However, this function can only be used with numerical columns, and factors are converted to variates.
The dialog will produce a warning if the weights seem excessively large. The new spreadsheet will not contain the original weights column.
Use weights from column
Specifies the column in the spreadsheet that contains the weights to be used in the expansion. Each row is repeated the number of times specified by the values in this column. If the column is a factor, then the levels values of the factor will be used, and if these are not defined, then the ordinal values will be used.
Keep rows with zero weight
When selected, a row with a weight of zero will be copied once into the new spreadsheet, otherwise no copies will be made. Rows with negative or missing weights will not be copied to the new spreadsheet.
Create unique column names
When selected, the column names in the new spreadsheet will be created with unique names so that they are different to the existing column names.
Set as active sheet
Sets the newly created spreadsheet to be the active spreadsheet.
Add to book
This provides a list of books that the new spreadsheet can be added to. The default book that spreadsheets are added to can be specified using the menu Tools | Spreadsheet Options | then clicking the Books tab.
See also
Split or Subset a Spreadsheet
Duplicate a Spreadsheet
Generate a Random Subset from a Spreadsheet
Spreadsheet Manipulate Menu
The NEXPAND function of CALCULATE can be used within the command language to provide this functionality for variates.