Path to mathematics-SPSS memo (1), path to mathematics-spss memo

Source: Internet
Author: User

Path to mathematics-SPSS memo (1), path to mathematics-spss memo

1. import data.

Create a script to open the seismic data.

Open an excel file

Get data/TYPE = XLSX

/FILE = 'H: \ mybook \ 4.5_month.xlsx'

/SHEET = name '4. 5_month'

/CELLRANGE = full

/READNAMES = on

/ASSUMEDSTRWIDTH = 32767.

EXECUTE.

Dataset name dataset 1 WINDOW = FRONT.

Save it as openxls. sps, and then run it

Open a csv file

Get data/TYPE = TXT

/FILE = "H: \ mybook \ 4.5_month.csv"

/DELCASE = LINE

/DELIMITERS = ","

/ARRANGEMENT = DELIMITED

/FIRSTCASE = 2

/IMPORTCASE = ALL

/VARIABLES =

Time A24

Latitude F8.4

Longpolling F9.4

Depth F6.2

Mag F3.1

MagType A3

Nst F2.0

Gap F5.1

Dmin F10.8

Rms F4.2

Net A2

Id A10

Updated A24

Place A17

Type A12

CACHE.

EXECUTE.

Dataset name: seismic data WINDOW = FRONT.

All content of this blog is original, if reproduced please indicate the source http://blog.csdn.net/myhaspl/

3. Save as a sav File

SAVEOUTFILE = 'H: \ mybook \ src \ 4.5 _ month. sav'

/COMPRESSED.

4. Open the sav File

And add a field

Get file = 'H: \ mybook \ machine learning version 3rd-2 \ src \ 4.5 _ month. sav'

/KEEP time depthmag

/RENAME time = time depth = earthquake depth mag = Magnitude.

STRING seismic category (A12 ).

IF (magnitude GT 3 AND magnitude LT 5) earthquake type = "Weak Earthquake ".

IF (magnitude GE 5 AND magnitude LT 7) Seismic Category = "Strong Earthquake ".

IF magnitude GE 7 earthquake type = "earthquake ".

EXECUTE.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.