楼主: Trevor
4294 7

[讨论]Data Matrix for PROC MDS? [推广有奖]

  • 1关注
  • 4粉丝

副教授

26%

还不是VIP/贵宾

-

TA的文库  其他...

Probability NewOccidental

RapidMiner NewOccidental

Machine Learning

威望
1
论坛币
3388 个
通用积分
0.4274
学术水平
25 点
热心指数
17 点
信用等级
24 点
经验
5231 点
帖子
414
精华
2
在线时间
176 小时
注册时间
2005-5-4
最后登录
2024-4-7

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

I am wondering if there might be someone in this platform that might be kind enough to let me know how to translate a square raw data matrix to ANY sort of distance (diagonal) matrix suitable for input to PROC MDS in SAS ?

[此贴子已经被作者于2005-5-25 11:12:33编辑过]

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:matrix Data For Mat MDS 讨论 proc matrix Data MDS

沙发
Trevor 发表于 2005-5-24 05:18:00 |只看作者 |坛友微信交流群
Question 1: Why The MDS and ALSCAL procedures in SAS may sometimes produce different results?

使用道具

藤椅
ReneeBK 发表于 2005-5-25 01:41:00 |只看作者 |坛友微信交流群

The MDS and ALSCAL procedures may sometimes produce different results for the following reasons:

  • With the LEVEL=INTERVAL option, PROC MDS fits a regression model while PROC ALSCAL fits a measurement model. These models are not equivalent if there is more than one partition, although the differences in the parameter estimates are usually minor.
  • PROC MDS and PROC ALSCAL use different algorithms for initialization and optimization. Hence, different local optima may be found by PROC MDS and PROC ALSCAL for some data sets with poor fit. Using the INAV=SSCP option causes the initial estimates from PROC MDS to be more like those from PROC ALSCAL.
  • The default convergence criteria in PROC MDS are more strict than those in PROC ALSCAL. The convergence measure in PROC ALSCAL may cause PROC ALSCAL to stop iterating because progress is slow rather than because a local optimum has been reached. Even if you run PROC ALSCAL with a very small convergence criterion and a very large iteration limit, PROC ALSCAL may never achieve the same degree of precision as PROC MDS. For most applications, this problem is of no practical consequence since two- or three-digit precision is sufficient. If the model does not fit well, obtaining higher precision may require hundreds of iterations.

使用道具

板凳
zhaoying33 发表于 2005-5-25 09:36:00 |只看作者 |坛友微信交流群

看看

使用道具

报纸
Trevor 发表于 2005-5-25 11:18:00 |只看作者 |坛友微信交流群
SAS Proc Autoreg takes care of the serial correlation in the error term. PA computes predicted values based on the structural model and the full model. The structural piece uses only the parameter estimates of the independent variables (no error terms). The full model adds back the AR1 error term to the model. I'm having trouble reconciling the computation of the 1st predicted value for the full model. SAS uses a Kalman filter to do this, and the calculation appears complex. Can anyone explain how the calculation is done for a simple (y regressed on time w/AR1 error term) regression, and refer me to a good reference source.

使用道具

地板
ReneeBK 发表于 2005-5-25 11:31:00 |只看作者 |坛友微信交流群

There are a lot of references for Kalman filters. The best source certainly are

1. Peter S. Maybeck. Stochastic Models, Estimation, and Control, volume 1. Academic Press, New York, 1979.

2. Applied Optimal Estimation by Arthur Gelb

3. A.H. Jazwinski, Stochastic Processes and Filtering Theory, Academic Press, New York, 1970

使用道具

7
ereree 发表于 2005-5-25 14:32:00 |只看作者 |坛友微信交流群

data raw; input Y1 Y2 Y3 Y4 Y5; cards; 5.7 4.3 4.8 4.8 5.7 9.7 5.4 3.1 2.9 2.9 6.2 4.0 5.6 4.3 5.7 13.5 10.1 9.7 8.8 10.6 2.4 2.3 2.8 2.7 3.1 ;

proc print data=raw; %inc '/usr/courses/RS718/distnew.sas'; %distance (data=raw, var=y1-y5, out=rawdist, method=euclid); proc print data=rawdist;

PROC MDS data=rawdist alternate=none coef=identity condition=matrix decimals=3 dim=1 to 2 fit=distance formula=1 inav=data level=absolute out=rawout outres=rawres over=1 pfinal pineigval shape=triangle;

PROC PLOT data=rawout; plot dim2*dim1; PROC PLOT data=rawres; plot fitdata*fitdist;

data corl; /*similarity matrix*/ input V1 V2 V3 V4 V5; cards; 1.000 0.330 0.846 0.666 0.430; 0.330 1.000 0.380 0.902 -0.700; 0.846 0.380 1.000 0.697 0.336; 0.666 0.902 0.697 1.000 -0.338; 0.430 -0.700 0.336 -0.338 1.000 ;

PROC PRINT data=corl; PROC CORR data=raw; /*this his how to get the correlation matrix*/ PROC MDS data=corl alternate=none coef=identity condition=matrix decimals=3 dim=1 to 2 fit=distance formula=1 inav=data level=absolute out=corlout outres=corlres over=1 pfinal pineigval; PROC PLOT data=corlout; plot dim2*dim1; PROC PLOT data=corlres; plot fitdata*fitdist;

/* PART II*/

DATA ELECT; set ssd.elect96; educ=0; if v960610 le 2 then educ=1; if v960610 eq 3 then educ=2; if v960610 eq 4 then educ=3; if v960610 eq 5 then educ=4; if v960610 eq 6 then educ=5; if v960610 eq 7 then educ=6; income=0; if v960701 le 10 then income=1; if v960701 in (11, 12, 13, 14, 15) then income=2; if v960701 in (16, 17, 18) then income=3; if v960701 in (19, 20) then income=4; if v960701 eq 21 then income=5; if v960701 eq 22 then income=6; if v960701 eq 23 then income=7; if v960701 eq 24 then income=8;

PROC CORR; var educ income; DATA CORRELEC; input v1 v2; cards; 1.00000 0.40746 0.40746 1.00000 ; proc print data=correlec; /* Correlation (similarity matrix), metric solution*/

PROC MDS data=correlec alternate=none coef=identity condition=matrix decimals=3 dim=1 to 2 fit=distance formula=1 inav=data level=absolute out=celecout outres=celecres over=1 pfinal pineigval shape=triangle;

PROC PLOT data=celecout; plot dim2*dim1; PROC PLOT data=celecres; plot fitdata*fitdist;

DATA DISTELEC; set elect;

PROC TRANSPOSE out=tranelec; var educ income;

%inc '/usr/courses/RS718/distnew.sas'; %distance (data=tranelec, out=elecdist, method=euclid); PROC PRINT data=elecdist;

/*Dissimilarity matrix (raw data), metric solution*/ PROC MDS data=elecdist alternate=none coef=identity condition=matrix decimals=3 dim=1 to 2 fit=distance formula=1 inav=data level=absolute out=delecout outres=delecres over=1 pfinal pineigval shape=triangle;

PROC PLOT data=delecout; plot dim2*dim1; PROC PLOT data=delecres; plot fitdata*fitdist;

/*Dissimilarity matrix (raw data), nonmetric solution*/ PROC MDS data=elecdist alternate=none coef=identity condition=matrix decimals=3 dim=1 to 2 fit=distance formula=1 inav=data level=ordinal out=nmetout outres=nmetres over=1 pfinal pineigval shape=triangle;

PROC PLOT data=nmetout; plot dim2*dim1; PROC PLOT data=nmetres; plot fitdata*fitdist;

run;

例子

给中文世界的优质语料添砖添瓦

使用道具

8
Trevor 发表于 2005-5-26 09:56:00 |只看作者 |坛友微信交流群

Dear all,

I'm trying to figure out how to estimate prediction intervals of a function using proc ARIMA. For example, there a time series Y_{n}, n=1... N, after modelling with proc ARIMA, how could I obtain the prediction interval for sum of Y_{N+1}, ...,Y_{N+16}?

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-20 14:18