99999久久久久久亚洲,欧美人与禽猛交狂配,高清日韩av在线影院,一个人在线高清免费观看,啦啦啦在线视频免费观看www

熱線電話:13121318867

登錄
首頁精彩閱讀SPSS進(jìn)行數(shù)據(jù)轉(zhuǎn)換(Transform)
SPSS進(jìn)行數(shù)據(jù)轉(zhuǎn)換(Transform)
2016-10-26
收藏

SPSS進(jìn)行數(shù)據(jù)轉(zhuǎn)換(Transform)

在有些情況下,原始數(shù)據(jù)難以滿足數(shù)據(jù)分析的要求,需要對原始數(shù)據(jù)進(jìn)行適當(dāng)?shù)霓D(zhuǎn)換。SPSS具體強(qiáng)大的數(shù)據(jù)轉(zhuǎn)換功能,它不僅可以進(jìn)行簡單的變量轉(zhuǎn)換和重新建立分類變量,還可以進(jìn)行復(fù)雜的統(tǒng)計(jì)函數(shù)運(yùn)算以及邏輯函數(shù)運(yùn)算。

在主菜單中點(diǎn)擊Transform命令,彈出數(shù)據(jù)轉(zhuǎn)換子菜單,如圖所示。


計(jì)算產(chǎn)生變量是根據(jù)已存在的變量,經(jīng)函數(shù)計(jì)算后,建立新變量或替換原變量值。1 計(jì)算產(chǎn)生變量(Compute..)

例如,我們在方差分析中常常要求對百分?jǐn)?shù)和層數(shù)描敘的數(shù)據(jù)作反正弦函數(shù)的轉(zhuǎn)換(sin-1SQRT(x))。
       ARSIN(SQRT(x))

首先,打開數(shù)據(jù)文據(jù)文件(DATA1-1.SAV),將數(shù)據(jù)調(diào)入工作區(qū)。然后,從菜單選擇Transform- Compute..命令,彈出計(jì)算產(chǎn)生變量對話框,如下圖:

Target Variable: 目標(biāo)變量名指定欄。可以輸入新的變量,也可以輸入已有的變量。輸入變量后,下邊的 [Type & Label..]按鈕就會被激活,點(diǎn)擊它出現(xiàn)變量定義的對話框,可以設(shè)置以下變量屬性。

Label 欄:
      ⊙Label 輸入標(biāo)簽名。
      ○Use expression as label: 以數(shù)學(xué)表達(dá)式作為標(biāo)簽。

Type 欄:
      ⊙Use Expression as label: 數(shù)字型變量
      ○String 字符型變量,Width: 8 字符寬度。

Numeric Expression: 數(shù)學(xué)表達(dá)式輸入

使用鍵盤或利用系統(tǒng)提供的計(jì)算面板輸入數(shù)學(xué)表達(dá)式。也可以將Functions(函數(shù))框里的函數(shù)選入表達(dá)式中。系統(tǒng)提供了70多種函數(shù),它包括算術(shù)函數(shù),統(tǒng)計(jì)函數(shù),分布函數(shù),日期函數(shù),缺失值函數(shù)和字符函數(shù)。

If…定義條件
      ⊙Include all cases: 包括所有記錄。
      ○Include if cases satisfies condition: 符合條件的記錄。選中此項(xiàng)后,條件輸入框激活,在此框中輸入
        變量的邏輯表達(dá)式。

SPSS 算術(shù)函數(shù)

注:x 可以是變量、常量,也可以是函數(shù)。

2 自動重新賦值(Automatic Recode)

有的時候,我們需要重新把數(shù)值變量或字符變量按它本身的數(shù)值大小轉(zhuǎn)換成為從1開始的順序整數(shù),并存放在新變量對應(yīng)的記錄中。
    首先,打開數(shù)據(jù)文據(jù)文件(DATA3-1.SAV),將數(shù)據(jù)調(diào)入工作區(qū)。然后,從菜單選擇“Transform- Automatic Recode”命令,彈出連續(xù)型變量轉(zhuǎn)換為分類變量對話框,如下圖:

操作步驟:

1)從左邊數(shù)據(jù)變量欄里把變量選入到右邊的“Variable->New Name”框中。

2)在“New Name:”輸入新變量名稱后,點(diǎn)擊 [Add New Name] 按鈕加入到“Variable->New Name”框中。

3)在“Recode Starting from”設(shè)置賦值順序,有以下兩種順序:
       ⊙Lowest value: 按從小到大順序,賦值為1開始的順序整數(shù)。
       ○Highest valus: 按從大到小順序,賦值為1開始的順序整數(shù)。

4)單擊 [OK] 按鈕,執(zhí)行轉(zhuǎn)換。

數(shù)據(jù)分析咨詢請掃描二維碼

若不方便掃碼,搜微信號:CDAshujufenxi

數(shù)據(jù)分析師資訊
更多

OK
客服在線
立即咨詢
客服在線
立即咨詢
') } function initGt() { var handler = function (captchaObj) { captchaObj.appendTo('#captcha'); captchaObj.onReady(function () { $("#wait").hide(); }).onSuccess(function(){ $('.getcheckcode').removeClass('dis'); $('.getcheckcode').trigger('click'); }); window.captchaObj = captchaObj; }; $('#captcha').show(); $.ajax({ url: "/login/gtstart?t=" + (new Date()).getTime(), // 加隨機(jī)數(shù)防止緩存 type: "get", dataType: "json", success: function (data) { $('#text').hide(); $('#wait').show(); // 調(diào)用 initGeetest 進(jìn)行初始化 // 參數(shù)1:配置參數(shù) // 參數(shù)2:回調(diào),回調(diào)的第一個參數(shù)驗(yàn)證碼對象,之后可以使用它調(diào)用相應(yīng)的接口 initGeetest({ // 以下 4 個配置參數(shù)為必須,不能缺少 gt: data.gt, challenge: data.challenge, offline: !data.success, // 表示用戶后臺檢測極驗(yàn)服務(wù)器是否宕機(jī) new_captcha: data.new_captcha, // 用于宕機(jī)時表示是新驗(yàn)證碼的宕機(jī) product: "float", // 產(chǎn)品形式,包括:float,popup width: "280px", https: true // 更多配置參數(shù)說明請參見:http://docs.geetest.com/install/client/web-front/ }, handler); } }); } function codeCutdown() { if(_wait == 0){ //倒計(jì)時完成 $(".getcheckcode").removeClass('dis').html("重新獲取"); }else{ $(".getcheckcode").addClass('dis').html("重新獲取("+_wait+"s)"); _wait--; setTimeout(function () { codeCutdown(); },1000); } } function inputValidate(ele,telInput) { var oInput = ele; var inputVal = oInput.val(); var oType = ele.attr('data-type'); var oEtag = $('#etag').val(); var oErr = oInput.closest('.form_box').next('.err_txt'); var empTxt = '請輸入'+oInput.attr('placeholder')+'!'; var errTxt = '請輸入正確的'+oInput.attr('placeholder')+'!'; var pattern; if(inputVal==""){ if(!telInput){ errFun(oErr,empTxt); } return false; }else { switch (oType){ case 'login_mobile': pattern = /^1[3456789]\d{9}$/; if(inputVal.length==11) { $.ajax({ url: '/login/checkmobile', type: "post", dataType: "json", data: { mobile: inputVal, etag: oEtag, page_ur: window.location.href, page_referer: document.referrer }, success: function (data) { } }); } break; case 'login_yzm': pattern = /^\d{6}$/; break; } if(oType=='login_mobile'){ } if(!!validateFun(pattern,inputVal)){ errFun(oErr,'') if(telInput){ $('.getcheckcode').removeClass('dis'); } }else { if(!telInput) { errFun(oErr, errTxt); }else { $('.getcheckcode').addClass('dis'); } return false; } } return true; } function errFun(obj,msg) { obj.html(msg); if(msg==''){ $('.login_submit').removeClass('dis'); }else { $('.login_submit').addClass('dis'); } } function validateFun(pat,val) { return pat.test(val); }