Advanced tables and statistics > Weighting > Copying weights into the data
 
Copying weights into the data
Quick reference
To transfer weights into the data, type:
wttran [matrix_number] c(start_col, end_col) :dec_places
in the edit.
More information
Often you might want to transfer the weights created during a run back into the data file itself, in order, for example, to give them to clients. This can be done using the statement:
wttran [wmm_num] c(m,n) :dp
in the edit. This tells Quantum which weighting matrix to use (you can omit this parameter if there is only one matrix), which columns to store the weights in and the number of decimal places required. Remember that the decimal point takes up a column in the data, so you must assign at least one column more than there are digits in the largest weight. If some weights have more digits before or after the decimal point than others, do not worry. Quantum always puts the decimal point in the same column.
Note When you use wttran, make sure that you include a write or split statement in the edit after the wttran statement to save the new data in a file. Remember that unless you specifically save your new data, all alterations or additions exist only as long as each record is being processed.
An example of wttran might be:
wttran 2 c(75,80) :2
which copies the respondent’s weight from matrix 2 into columns 75 to 80 of the data record. The weight is copied with two decimal places and has the decimal point in c78.
See also
Weighting