If you would like to run this example, you may download CallSCL.zip. After unzipping this program (using WinZip or by renaming it as a self-extracting zip file CallSCL.exe), you can run the setup program to install the CallSCL Visual Basic application. You will need to install the program in a specific directory: c:\callscl. You can also open the Visual Basic project files directly if you have Visual Basic 5.0 loaded on your computer.
Private Sub Command1_Click()
' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
' Run matrix.scl.
RetVal = Shell("c:\stat\sta_run.exe c:\callscl\matrix.scl", 1)
End Sub
STATISTICA Command Language Code
File = "c:\callscl\poverty.sta" {opens the data file}
STBASIC
PROGRAM = "c:\callscl\matrix.stb" {calls the STATISTICA BASIC program}
STATISTICA BASIC Code
RandomAccess;
ReDim corr(NVars, NVars);
ReDim eigenval(NVars);
MatrixCorrelations(Data, 1, corr); {calculate the correlation matrix}
MatrixEigenvalues(corr, eigenval, numeigen); {calculate the eigenvalues}
MatrixSaveAsDataFile (eigenval, "c:\callscl\eigenval.sta"); {save the eigenvalues in an .sta file}
| Back to List of Programs |
![[StatSoft]](../../images/sssmall.gif)
2300 East 14th Street, Tulsa, OK 74104
Phone: (918) 749-1119; Fax: (918) 749-2217
e-mail: info@statsoft.com
©Copyright StatSoft, Inc., 1984-2005.
StatSoft, StatSoft logo, STATISTICA, SEWSS, SEDAS, Data Miner, SEPATH and GTrees are trademarks of StatSoft, Inc.