Vector
Vector. (One dimensional array of numbers).
Vector Declaration
There are several ways to create a vector object. Enter the vector keyword (with an optional dimension) followed by a name:
vector scalarmat
vector(10) results
Alternatively, you may declare a vector using an assignment statement. The vector will be sized and initialized, accordingly:
vector(10) myvec = 3.14159
vector results = vec1
Vector Views
cov compute variance measures for the data in the vector.
edftest empirical distribution function tests.
hist descriptive statistics and histogram.
label label information for the vector object.
sheet spreadsheet view of the vector.
stats descriptive statistics.
statby statistics by classification.
testby equality test by classification.
Vector Procs
classify recode vector into classes defined by a grid, specified limits, or quantiles.
clearhist clear the contents of the history attribute.
copy creates a copy of the vector.
distdata save a matrix containing distribution plot data computed from the vector.
export export vector as Excel 2007 XLSX, CSV, tab-delimited ASCII text, RTF, HTML, Enhanced Metafile, PDF, TEX, or MD file on disk.
fill fill elements of the vector.
getglobalc copy the contents of the workfile C coefficient vector into the vector object.
import imports data from a foreign file into the vector object.
olepush push updates to OLE linked objects in open applications.
read (deprecated) import data from disk.
resample resample from the rows of the vector
.
resize resize the vector object.
setattr set the value of an object attribute.
setformat set the display format for the vector spreadsheet.
setglobalc copy the contents of the vector object into the workfile C coefficient vector.
setindent set the indentation for the vector spreadsheet.
setjust set the horizontal justification for all cells in the spreadsheet view of the vector object.
setwidth set the column width for the vector spreadsheet.
showlabels displays the custom row and column labels of a vector spreadsheet.
write export data to disk.
Vector Graph Views
Graph creation views are discussed in detail in
“Graph Creation Command Summary”.
area area graph of the vector.
bar bar graph of data against the row index.
line line graph of the data against the row index.
qqplot quantile-quantile graph.
Vector Data Members
String values
@attr("arg") string containing the value of the arg attribute, where the argument is specified as a quoted string.
@collabels string containing the column label of the vector.
@description string containing the Vector object’s description (if available).
@detailedtype string with the object type: “VECTOR”.
@displayname string containing the Vector object’s display name. If the Vector has no display name set, the name is returned.
@name string containing the Vector object’s name.
@remarks string containing the Vector object’s remarks (if available).
@rowlabels string containing the row labels of the vector.
@type string with the object type: “VECTOR”.
@updatetime string representation of the time and date at which the Vector was last updated.
Scalar values
(i) i-th element of the vector. Simply append “(i)” to the vector name (without a “.”).
@rows number of rows in the svector.
Vector values
@droprow(arg) Returns the vector with the rows defined by arg removed. arg may be an integer, vector of integers, string, or svector of strings. Integers correspond to row numbers so that, for example, arg = 2 specifies the second row. Strings correspond to row labels so that arg = "2" specifies the first row labeled “2”.
@irow(arg) Returns the indices for the rows defined by arg where arg is a string or svector of strings. The strings correspond to row labels so that arg = "2" specifies the first row labeled “2”.
@row(arg) Returns the rows defined by arg. arg may be an integer, vector of integers, string, or svector of strings. Integers correspond to row numbers so that, for example, arg = 2 specifies the second row. Strings correspond to row labels so that arg = "2" specifies the first row labeled “2”.
@t Returns transpose.