欢迎来到天天文库
浏览记录
ID:42304417
大小:3.13 MB
页数:11页
时间:2019-09-12
《spss编程命令集》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、SPSS复习提纲基本操作读取数据读取文件datalistfile=’’fixed/free/{varname}{format}.读取数列datalist/{varname}{format}.begindata{datalist}enddata.读取矩阵matrixdatavariable{varname}/file=’’/n={n}/contents=corr.数据编辑变量名变量名不超过8个字符,名首必须是字母变量标签variablelabels{varname}’’.不能超过40个字符值标签valuelabels{varname}
2、{value}’’.不能超过20个字符形式format{varname}(f{w.d}).缺失值missingvalues{varname}().排序sortcasesby{varname}(a/b).数据合并addfiles/file=*/file=’’/rename{oldvarname}={newvarname}/drop{varname}.数据转换Computecompute{targetvarname}={expression}.算术运算:+,-,*,/,**(幂)算术函数:sqrt,rnd(四舍五入),trunc(取整)
3、统计函数:mean,sum,sd,max,min缺失值函数:SYSMIS,MISSING,NMISS,NVALID,VALUE(不算缺失值)时间函数:CTIME.DAYS,$JDATEIfif(){targetvarname}={expression}.Recoderecode{varname}(oldvalue/else/lowestthrough{value}/{value}through{value}/{value}throughhigh=newvalue)into{newvarname}.Missingvalues:user
4、-defined也会被重编码,因此应小心user-defined.user-defined不包括在范围内SplitfileSortcasesby{varname}.splitfilelayeredby{varname}.splitfileoff.Flipflipvariables={varname}/all.Rankrankvariable={varname}.数据分析描述性统计FrequenciesFrequencies{varname}/histogramNORMAL/barchart(freq/percent)/piechar
5、t.DescriptiveDescriptive{varname}/statistics=summeanminmax(集中趋势)RANGEstddevSEMEANVARIANC(离中趋势)skewness(偏度)SESKEWKURTOSIS(峰度)SEKURT(形状测量)/{varname}(z{newvarname}).Exploreexamine{varname}/plotBOXPLOTSTEAMLEAFHISTOGRAM(不带有正态曲线)NPPLOT(证明正态)/STATISTICSDESCRIPTIVESEXTREME/ME
6、STIMATORS(修正均值).CrosstabsCrosstabs/tables={rowvarname}BY{columnvarname}/Statistic=chisq(默认)corrKAPPA(评定者间一致性系数)PHICC(修正)/CELLS=.相关分析Graphscatterplot={varname}with{varname}.Personcorrelations/variables={varlist}/MISSING=PAIRWISE/LISTWISE(数据足够时更稳定).Spearman/kendall(顺序变量)
7、nonparcorr/variables={varlist}/print=spearman(默认)/kendall(有重复)/both.差异性检验单样本t检验t-testtestval={value}/variables={varname}.独立样本t检验t-testgroups={varname}(value1value2)/variables={varname}.相关样本t检验t-testpairs={varname}with{varname}.曼-惠特尼U检验npartests/m-w={varname}with{value1
8、value2}.维克尔松检验npartest/wilcoxon={varname}with{varname}.方差分析前提假设:独立、等距、正态、同质数据要求:多元正态,线性(散点图)Onewayanova(单一自变量平-单一因变量)
此文档下载收益归作者所有