
Products:
Statit
e-QC, Statit
e-Server, Statit
Custom QC
You may have the need to transpose the Statit
workspace; that is, to change the data so that
cases become variables and variables become
cases. This may be necessary because the data
is stored such that when read into Statit, the
data you want to be a variable is read as a
case.
Current versions of Statit have the transpose
command. However, with a few commands, you can
write a macro to do this. Here is what you need:
matrix*
build(all) /nolist /usemissing
matrix Matrix.Build = trn(Matrix.Build)
matrix* break(Matrix.Build) /nolist
variable delete v1 to Matrix.Build /nolist
The first line takes all the variables in the
workspace and creates a matrix variable. The
second line transposes this matrix variable.
The third line breaks the transposed matrix
variable into common variables. The fourth line
cleans up unnecessary variables.
Problems
Can you see the problems with this? This macro
is limited as follows:
1.
It transposes the whole workspace, not a specific
list of variables.
2. All the variables must be numeric, because
they are converted to a matrix variable.
Download
transpose.stc
is provided here as an unsupported macro for
you to download and learn from. Modify it to
suit your needs.
If you would like additional information, please
call our Support staff at (541) 752-4100 or
send email to
.
|