资源描述:
《sas im reference card(iml参考详细表)》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、SAS/IMLReferenceCardCreatingMatrices12M={12,34}createsmatrix34I(n)identitymatrixofsizendiag(V),diag({...})diagonalmatrixwhoseelementsarethoseofvectorVor{...}vecdiag(M)columnvectormadeofM’sdiagonalelements(n:p)sequencevectorrangingfromntopwithanincrementof1do(x,y,t)seq
2、uencevectorrangingfromxtoywithanincrementoftJ(r,c,v)matrixofsizer×cfilledwithelementvrepeat(M,r,c)matrixthatrepeatsblockM,rtimesinrowandctimesincolumnshape(V,r,c)matrixofsizer×cfilledwiththeelementsofVM‘ouT(M)MtransposedA
3、
4、BhorizontalconcatenationofAandBA//Bverticalconcat
5、enationofAandBOperationsonMatricesandScalars+addition(matricesorscalars)−subtraction(matricesorscalars)∗matrixmultiplication(matricesorscalars)#elementwisemultiplication(matricesorscalars)/elementwisedivision(matricesorscalars)∗∗matrixpoweroperator##elementwisepoweroper
6、atorsqrt(M)elementwisesquarerootoperator@KroneckerproductExtractions/Reductions/ComparisonsM[Vr,Vc]extractofMwithrowscorrespondingtoVrandcolumnstoVcM[Vr,]extractofMwithrowscorrespondingtoVr(allcolumns)M[,Vc]extractofMwithcolumnscorrespondingtoVc(allrows)M[+]scalarcorres
7、pondingtothesumofM’selementsM[,:]columnvectorofthemeansofM’srowsM[<>,]rowvectormadeofthemaximumelementofeachofM’scolumns>indexofthemaximum>:0booleanmatrixoftheresultofthetestoneachofA’selements(samesizeasA)Matrixfonct
8、ionsnrow(M)numberofrowsinMncol(M)numberofcolumnsinMdet(M)determinantofMinv(M)inverseofMtrace(M)traceofMeigval(M)eigenvaluesofMeigvec(M)eigenvectorsofMroot(M)CholeskydecompositionofM(positive)suchthatU‘U=MGeneralSASfonctionsprintA;printsAintheoutputprint(ncol(A));idembut
9、useparenthesisifthereisanoperationrannor(J(n,p,0))createsan×pmatrixwithelementsdrawninanormaldistribution(mean0andvariance1)ranuni(J(n,p,0))createsan×pmatrixwithelementsdrawninauniformdistributionontheinterval[0,1]probnorm(x)probabilitythatavariablefollowinganormaldistr
10、ibution(0,1)isinferiortoxprobt(x,df)probabilitythatavariablefollowingaStudentdistributionwithdfdegreesoffreedo