版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
統(tǒng)計軟件SAS簡介及程序范例1.SAS簡介2.《試驗統(tǒng)計方法》教材例題的SAS程序及運行結果統(tǒng)計軟件SAS簡介及程序范例1.SAS簡介11.SAS簡介
SAS(StatisticalAnalysisSystem,統(tǒng)計分析系統(tǒng))是當今國際上著名的數(shù)據(jù)分析軟件系統(tǒng),其基本部分是SAS/BASE軟件。20世紀60年代末期,由美國北卡羅納州州立大學(NorthCarolinaStateUniversity)的A.J.Barr和J.H.Goodnight兩位教授開始開發(fā),1975年創(chuàng)建了美國SAS研究所(SASInstituteInc.)。之后,推出的SAS系統(tǒng),始終以領先的技術和可靠的支持著稱于世,通過不斷發(fā)展和完善,目前已成為大型集成應用軟件系統(tǒng)。1.SAS簡介SAS(StatisticalAn2
SAS系統(tǒng)具有統(tǒng)計分析方法豐富、信息儲存簡單、語言編程能力強、能對數(shù)據(jù)連續(xù)處理、使用簡單等特點。SAS是一個出色的統(tǒng)計分析系統(tǒng),它匯集了大量的統(tǒng)計分析方法,從簡單的描述統(tǒng)計到復雜的多變量分析,編制了大量的使用簡便的統(tǒng)計分析過程。SAS系統(tǒng)具有統(tǒng)計分析方法豐富、信息儲存簡單3SAS系統(tǒng)運行的幾個重要前提條件
(一)SAS系統(tǒng)運行時要同時打開的文件較多,因此在微型計算機的系統(tǒng)配置文件CONFIG.SYS中應指定FILES=50或以上;(二)SAS系統(tǒng)軟件有時間租期限制,因此只有機器時間(DATE)在軟件有效期內才能運行。時間租期取決于SAS出售版本日期,即所謂的SAS誕生日(BIRTHDAY)。(三)SAS系統(tǒng)應全部安裝到硬盤的SAS子目錄下,硬盤應至少有10M空間。SAS系統(tǒng)運行的幾個重要前提條件(一)SAS系4SASforWindows的啟動與退出
(一)啟動SASforWindows的啟動,按如下步驟進行。開機后,直接用鼠標雙擊桌面上SAS系統(tǒng)的快捷鍵圖標,自動顯示主畫面,即可進入SAS系統(tǒng)。SASforWindows的啟動與退出(一)啟5
(二)退出當用完SASforWindows,需要退出時,可以單擊【File】,選擇【Exit】,或者,單擊×(關閉)按鈕,立即顯示。如果確認需要退出SASforWindows,單擊確定按鈕;如果需要繼續(xù)使用SASforWindows,單擊取消按鈕。(二)退出當用完SASforWindows62.《試驗統(tǒng)計方法》教材例題的SAS程序及運行結果t測驗方差分析直線回歸分析協(xié)方差分析2.《試驗統(tǒng)計方法》教材例題的SAS程序及運行結果t測驗7t檢驗樣本平均數(shù)與總體平均數(shù)的差異顯著性檢驗配對試驗資料的t檢驗非配對試驗資料的t檢驗t檢驗樣本平均數(shù)與總體平均數(shù)的差異顯著性檢驗8樣本平均數(shù)與總體平均數(shù)的差異顯著性檢驗(例4.3)datatestt1;inputx@@;differ=x-27.5;cards;32.528.628.424.729.127.229.833.329.7;proc
means
n
mean
stderr
tprt;run;樣本平均數(shù)與總體平均數(shù)的差異顯著性檢驗(例4.3)data9運行結果
TheMEANSProcedureVariableNMeanStdErrortValuePr>|t|x929.25555560.862346833.93<.0001differ91.75555560.86234682.040.0762運行結果TheMEANSProcedure10配對試驗資料的t檢驗(例4.7)
datatestt2;inputtreatx1x2@@;differ=x1-x2;cards;12722.2951.422866.71417.032675.91275.342169.22228.552253.92462.662415.12715.4;proc
means
mean
stderr
tprt;vardiffer;run;配對試驗資料的t檢驗(例4.7)datatestt2;11運行結果
TheMEANSProcedureAnalysisVariable:differMeanStdErrortValuePr>|t|675.4666667391.52539521.730.1451運行結果TheMEANSProcedure12非配對試驗資料的t檢驗(例4.5)datatestt3;inputvarietyx@@;cards;118.68120.67118.42118.00117.44115.95218.68223.22221.42219.00218.92;proc
ttest;classvariety;varx;run;非配對試驗資料的t檢驗(例4.5)datatestt3;13運行結果TheTTESTProcedureT-TestsVariableMethodVariancesDFtValuePr>|t|xPooledEqual9-1.920.0868xSatterthwaiteUnequal7.51-1.870.1001EqualityofVariancesVariableMethodNumDFDenDFFValuePr>FxFoldedF451.660.5880運行結果TheTTESTProcedure14方差分析單因素完全隨機化試驗重復數(shù)相等資料單因素完全隨機化試驗重復數(shù)不等資料兩因素交叉分組試驗單獨觀測值資料兩因素交叉分組試驗有重復觀測值資料次級樣本含量相等的二因素系統(tǒng)分組資料單因素隨機區(qū)組設計試驗資料拉丁方設計試驗結果兩因素隨機區(qū)組設計試驗資料兩因素裂區(qū)設計試驗資料方差分析單因素完全隨機化試驗重復數(shù)相等資料15單因素完全隨機化試驗重復數(shù)相等資料
的方差分析(教材【例5.3】)
dataanova1;inputvarietyx@@;cards;11211011411611211828210212214212216314316313316310315416418420416414416;proc
anova;classvariety;modelx=variety;meansvariety/duncan;run;單因素完全隨機化試驗重復數(shù)相等資料
的方差分析(教材【例5.16運行結果
TheANOVAProcedureClassLevelInformationClassLevelsValuesvariety41234Numberofobservations24運行結果TheANOVAProcedure17
TheANOVAProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel367.166666722.38888893.430.0369Error20130.66666676.5333333CorrectedTotal23197.8333333R-SquareCoeffVarRootMSExMean0.33951118.149392.55603914.08333SourceDFAnovaSSMeanSquareFValuePr>Fvariety367.1666666722.388888893.430.0369TheANOVAProcedure18
TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom20ErrorMeanSquare6.533333NumberofMeans234CriticalRange3.0783.2313.328
TheANOVAProcedure19Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNvarietyA16.66764ABA14.00063BABA13.66761BB12.00062Meanswiththesameletterare20單因素完全隨機化試驗重復數(shù)不等資料
的方差分析(教材【例5.4】)
dataanova2;inputvarietyx@@;cards;121.5119.5120.0122.0118.0120.0216.0218.5217.0215.5220.0216.0319.0317.5320.0318.0317.0421.0418.5419.0420.0515.5518.0517.0516.0;proc
glm;classvariety;modelx=variety;meansvariety/duncan;run;單因素完全隨機化試驗重復數(shù)不等資料
的方差分析(教材【例5.21運行結果
TheGLMProcedureClassLevelInformationClassLevelsValuesvariety512345Numberofobservations25運行結果TheGLMProcedure22
TheGLMProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel446.4983333311.624583335.990.0025Error2038.841666671.94208333CorrectedTotal2485.34000000R-SquareCoeffVarRootMSExMean0.5448607.5656161.39358718.42000SourceDFTypeISSMeanSquareFValuePr>Fvariety446.4983333311.624583335.990.0025SourceDFTypeIIISSMeanSquareFValuePr>Fvariety446.4983333311.624583335.990.0025TheGLMProcedure23
TheGLMProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom20ErrorMeanSquare1.942083HarmonicMeanofCellSizes4.83871NOTE:Cellsizesarenotequal.NumberofMeans2345CriticalRange1.8691.9622.0212.062TheGLMProcedure24
Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNvarietyA20.166761AA19.625044ABA18.300053BB17.166762BB16.625045Meanswiththesameletterar25兩因素交叉分組試驗單獨觀測值資料
的方差分析(教材【例5.5】)
dataanova3;inputfieldmethodx@@;cards;117112731377219022902392315932703380417542804382516552605367618262866385;proc
anova;classfieldmethod;modelx=fieldmethod;meansfieldmethod/duncan;run;兩因素交叉分組試驗單獨觀測值資料
的方差分析(教材【例5.526運行結果
TheANOVAProcedureClassLevelInformationClassLevelsValuesfield6123456method3123Numberofobservations18運行結果TheANOVAProcedure27
TheANOVAProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel71576.555556225.22222213.970.0002Error10161.22222216.122222CorrectedTotal171737.777778R-SquareCoeffVarRootMSExMean0.9072255.2221444.01524976.88889SourceDFAnovaSSMeanSquareFValuePr>Ffield51435.111111287.02222217.800.0001method2141.44444470.7222224.390.0429TheANOVAProcedure28TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom10ErrorMeanSquare16.12222NumberofMeans23456CriticalRange7.3057.6337.8277.9518.033TheANOVAProcedure29Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNfieldA90.66732ABA84.33336BBC79.00034CDC73.66731DDE69.66733EE64.00035Meanswiththesameletterare30
TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom10ErrorMeanSquare16.12222NumberofMeans23CriticalRange5.1655.398TheANOVAProcedure31Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNmethodA80.50063ABA76.50062BB73.66761Meanswiththesameletterare32兩因素交叉分組試驗有重復觀測值資料
的方差分析(教材【例5.6】)
dataanova4;inputdensityfertx@@;cards;112712261331143015251129122513301430152511261224133014311526112612291331143015242130222823312432252821302227233124342529212822262330243325282129222523322432252731333233333534353530313332343333343435293134323433373433353131323235333534353530;proc
anova;classdensityfert;modelx=densityfertdensity*fert;meansdensityfert/duncan;meansdensity*fert/lsd;run;兩因素交叉分組試驗有重復觀測值資料
的方差分析(教材【例5.33運行結果
TheANOVAProcedureClassLevelInformationClassLevelsValuesdensity3123fert512345Numberofobservations60運行結果TheANOVAProcedure34
TheANOVAProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel14573.333333340.952381033.51<.0001Error4555.00000001.2222222CorrectedTotal59628.3333333R-SquareCoeffVarRootMSExMean0.9124673.6647791.10554230.16667SourceDFAnovaSSMeanSquareFValuePr>Fdensity2315.8333333157.9166667129.20<.0001fert4207.166666751.791666742.38<.0001density*fert850.33333336.29166675.150.0001TheANOVAProcedure35
TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom45ErrorMeanSquare1.222222NumberofMeans23CriticalRange.7041.7405TheANOVAProcedure36
Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNdensityA33.2500203B29.5000202C27.7500201Meanswiththesameletterar37
TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom45ErrorMeanSquare1.222222NumberofMeans2345CriticalRange0.9090.9560.9871.009TheANOVAProcedure38
Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNfertA32.4167124AA32.1667123B29.7500121C28.8333122Meanswiththesameletterar39
TheANOVAProcedureLevelofLevelof--------------x--------------densityfertNMeanStdDev11427.00000001.4142135612426.00000002.1602469013430.50000000.5773502714430.25000000.5000000015425.00000000.8164965821429.25000000.9574271122426.50000001.2909944523431.00000000.8164965824432.75000000.9574271125428.00000000.8164965831433.00000000.8164965832434.00000000.8164965833435.00000001.6329931634434.25000000.9574271135430.00000000.81649658TheANOVAProcedure40次級樣本含量相等的二因素系統(tǒng)分組資料
的方差分析【例5.7】
dataanova5;inputplantleafx@@;cards;1112.11112.11212.81212.82114.42114.42214.72214.53123.13123.43228.13228.8;proc
anova;classplantleaf;modelx=plantleaf(plant);meansplant/duncan;run;次級樣本含量相等的二因素系統(tǒng)分組資料
的方差分析【例5.7】41運行結果
TheANOVAProcedureClassLevelInformationClassLevelsValuesplant3123leaf212Numberofobservations12運行結果TheANOVAProcedure42
TheANOVAProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel5444.350000088.87000001720.06<.0001Error60.31000000.0516667CorrectedTotal11444.6600000R-SquareCoeffVarRootMSExMean0.9993031.2914940.22730317.60000SourceDFAnovaSSMeanSquareFValuePr>Fplant2416.7800000208.39000004033.35<.0001leaf(plant)327.57000009.1900000177.87<.0001TheANOVAProcedure43TheANOVAProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom6ErrorMeanSquare0.051667NumberofMeans23CriticalRange.3933.4076TheANOVAProcedure44Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNplantA25.850043B14.500042C12.450041Meanswiththesameletterar45單因素隨機區(qū)組設計試驗資料
的分析(教材【例10.1】)
dataanova6;inputvariety$blockx@@;cards;A115.3B118.0C116.6D116.4E113.7F117.0D217.3F217.6E213.6C217.8A214.9B217.6C317.6A316.2F318.2B318.6D317.3E313.9B418.3D417.8A416.2E414.0F417.5C417.8;proc
glm;classvarietyblock;modelx=varietyblock;meansvariety/duncan;run;單因素隨機區(qū)組設計試驗資料
的分析(教材【例10.1】)d46運行結果TheGLMProcedureClassLevelInformationClassLevelsValuesvariety6ABCDEFblock41234Numberofobservations24運行結果TheGLMProcedure47
TheGLMProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel855.058333336.8822916751.75<.0001Error151.995000000.13300000CorrectedTotal2357.05333333R-SquareCoeffVarRootMSExMean0.9650332.1925350.36469216.63333SourceDFTypeISSMeanSquareFValuePr>Fvariety552.3783333310.4756666778.76<.0001block32.680000000.893333336.720.0043TheGLMProcedure48
TheGLMProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom15ErrorMeanSquare0.133NumberofMeans23456Criticalrange.5496.5762.5927.6039.6120TheGLMProcedure49
Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNvarietyA18.12504BB17.57504FBB17.45004CBB17.20004DC15.65004AD13.80004EMeanswiththesameletterar50拉丁方設計試驗結果的分析(教材【例10.3】)
dataanova7;inputnd$rowcolx@@;cards;C1110.1A127.9B139.8E147.1D159.6A217.0D2210.0E237.0C249.7B259.1E317.6C329.7D3310.0B349.3A356.8D4110.5B429.6C439.8A446.6E457.9B518.9E528.9A538.6D5410.6C5510.1;proc
glm;classndrowcol;modelx=ndrowcol;meansnd/duncan;run;拉丁方設計試驗結果的分析(教材【例10.3】)dataa51運行結果
TheGLMProcedureClassLevelInformationClassLevelsValuesnd5ABCDErow512345col512345Numberofobservations25運行結果TheGLMProcedure52
TheGLMProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel1235.503200002.9586000010.880.0001Error123.263200000.27193333CorrectedTotal2438.76640000R-SquareCoeffVarRootMSExMean0.9158245.8671500.5214728.888000SourceDFTypeISSMeanSquareFValuePr>Fnd432.206400008.0516000029.61<.0001row42.170400000.542600002.000.1594col41.126400000.281600001.040.4286TheGLMProcedure53TheGLMProcedureDuncan'sMultipleRangeTestforxNOTE:ThistestcontrolstheTypeIcomparisonwiseerrorrate,nottheexperimentwiseerrorrate.Alpha0.05ErrorDegreesofFreedom12ErrorMeanSquare0.271933NumberofMeans2345CriticalRange.7186.7522.7725.7860TheGLMProcedure54Meanswiththesameletterarenotsignificantlydifferent.DuncanGroupingMeanNnd
A10.14005DABA9.88005CBB9.34005B
C7.70005ECC7.38005AMeanswiththesameletterare55兩因素隨機區(qū)組設計試驗資料
的方差分析(【例10.5】)
dataanova7;inputabblockx@@;cards;32110.012111.021119.041117.022120.011112.031119.042111.022219.011213.041216.012210.03228.021216.04229.031218.041315.03237.021312.031316.011313.012313.022317.04238.0;proc
glm;classabblock;modelx=abblocka*b;meansaba*b/duncan;run;兩因素隨機區(qū)組設計試驗資料
的方差分析(【例10.5】)d56運行結果TheGLMProcedureClassLevelInformationClassLevelsValuesa41234b212block3123Numberofobservations24運行結果TheGLMProcedure57TheGLMProcedureDependentVariable:xSumofSourceDFSquaresMeanSquareFValuePr>FModel9332.625000036.958333317.06<.0001Error1430.33333332.1666667CorrectedTotal23362.9583333R-SquareCoeffVarRootMSExMean0.91642810.737701.47196013.70833SourceDFTypeISSMeanSquareFValuePr>Fa398.791666732.930
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度專業(yè)牧場代牧服務標準合同4篇
- 2025年度臨時停車場帳篷搭建施工合同范本3篇
- 2024物流包裝與裝卸合同
- 2025年度智慧家居產品研發(fā)承包經營合同書范文4篇
- 2025年度桉樹種植與生物質能利用技術研發(fā)合同3篇
- 2025年個人汽車抵押貸款抵押權設立及轉讓合同4篇
- 2025年度住宅小區(qū)地下車庫車位使用權購買合同范本4篇
- 2025年度文化產業(yè)園開發(fā)承包合同股東內部合作協(xié)議4篇
- 2024年甲乙雙方石材供需合同
- 2025年度新能源項目地質鉆孔工程承包協(xié)議4篇
- 有效排痰的護理ppt(完整版)
- 魯教版七年級數(shù)學下冊(五四制)全冊完整課件
- 英語六級詞匯(全)
- 算法向善與個性化推薦發(fā)展研究報告
- 聚合物的流變性詳解演示文稿
- 電氣設備預防性試驗安全技術措施
- 醫(yī)院出入口安檢工作記錄表范本
- 內科學教學課件:免疫性血小板減少癥(ITP)
- 中華人民共和國文物保護單位登記表
- 《生物制品學》課程教學大綱
- 硅基負極材料項目可行性研究報告_范文參考
評論
0/150
提交評論