|
|
|
||||
|
|
|||||
We will start with inputting an Excel file. The variable names are on the first line of the Excel file.
File
Open
from "Files of type", select Excel .xls format
select file: c:\statistica\hs0.xls
Open
click on "Import all sheets to a Workbook"
click "Get variables names from first row"
OK
A comma-separated-values (.csv) format data file is a text data file and can be read in as follows. The variable names are on the first line of our data file hs0.csv. The same procedure will also work with tab-delimited data files.
Open
from "Files of type", select Text files (*.txt, .csv)
select file: c:\statistica\hs0.csv
Open
select "Auto" as Import type
OK
select Comma as the Field Separator and Get variable
names from first row
OK
The other type of commonly used ASCII data format is fixed format. It always requires a codebook to specify which column corresponds to which variable. Here is small example of this type of data with a codebook.
195 094951
26386161941
38780081841
479700 870
56878163690
66487182960
786 069 0
88194193921
98979090781
107868180801
variable name column number id 1-2 a1 3-4 t1 5-6 gender 7 a2 8-9 t2 10-11 tgender 12
File
Open
from "Files of type", select All files (*.*)
select file: c:\statistica\schdat.fix
Open
click on Import as Spreadsheet
select "Fixed" as Import type
OK
under file size, change No. of vars to 7 and No. of cases to 10
in the format statement box, type 3F2 F1 2F2 F1
OK
Last but not least, here is how to open an Statistica data file.
File Open select File: c:\statistica\hs0.sta Open
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services