I mean my program not your program as you see I simulate p and r matrix by using your program thank you very much for your help but when I put in my program also I see errors.i wish to help me.
Regards
I mean my program not your program as you see I simulate p and r matrix by using your program thank you for your help but when I put these matrices in my program also I have a problem with the program .I wish to help me.
Regards
dear dr. rick
i wish to help me to correct this program please.
regards
proc iml;
load module=_all_; /* load the modules */
/* P1 P2 P3 p4 p5 p6 p7 p8 p9 p10 */
P = {0.05 0.05 0.05 0.1 0.05 0.05 0.1 0.1 0.1 0.2,
0.05 0.05 0.2 0.1 0.2 0.05 0.15 0.05 0.05 0.1,
0.05 0.1 0.05 0.2 0.05 0.05 0.05 0.2 0.2 0.1,
0.05 0.2 0.2 0.15 0.1 0.05 0.05 0.2 0.05 0.15,
0.05 0.1 0.05 0.05 0.1 0.15 0.2 0.05 0.05 0.05,
0.1 0.15 0.1 0.05 0.05 0.2 0.2 0.05 0.2 0.05,
0.1 0.05 0.1 0.05 0.15 0.1 0.05 0.05 0.05 0.05,
0.15 0.2 0.15 0.2 0.05 0.1 0.1 0.05 0.1 0.2,
0.2 0.05 0.05 0.05 0.2 0.2 0.05 0.1 0.15 0.05,
0.2 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.05 0.05};
/* expected values and variance for each ordinal variable */
Expected = OrdMean(P) // OrdVar(P);
varNames = "X1":"X10";
print Expected[r={"Mean" "Var"} c=varNames];
/* test the RandMVOrd function */
Delta = {1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05,
0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1,
0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15,
0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2,
0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25,
0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3,
0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35,
0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4,
0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45,
0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1};
call randseed(54321);
X = RandMVOrdinal(1000, P, Delta);
print first[label="First 1000 Obs: Multivariate Ordinal"];
after some corrections i got on mean and variance only but i want data.
regards
proc iml;
load module=_all_; /* load the modules */
/* P1 P2 P3 p4 p5 p6 p7 p8 p9 p10 */
P = {0.05 0.05 0.05 0.1 0.05 0.05 0.1 0.1 0.1 0.2,
0.05 0.05 0.2 0.1 0.2 0.05 0.15 0.05 0.05 0.1,
0.05 0.1 0.05 0.2 0.05 0.05 0.05 0.2 0.2 0.1,
0.05 0.2 0.2 0.15 0.1 0.05 0.05 0.2 0.05 0.15,
0.05 0.1 0.05 0.05 0.1 0.15 0.2 0.05 0.05 0.05,
0.1 0.15 0.1 0.05 0.05 0.2 0.2 0.05 0.2 0.05,
0.1 0.05 0.1 0.05 0.15 0.1 0.05 0.05 0.05 0.05,
0.15 0.2 0.15 0.2 0.05 0.1 0.1 0.05 0.1 0.2,
0.2 0.05 0.05 0.05 0.2 0.2 0.05 0.1 0.15 0.05,
0.2 0.05 0.05 0.05 0.05 0.05 0.05 0.15 0.05 0.05};
/* expected values and variance for each ordinal variable */
Expected = Mean(P) // Var(P);
varNames = "X1":"X10";
print Expected[r={"Mean" "Var"} c=varNames];
/* test the RandMVOrd function */
Delta = {1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05,
0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1,
0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15,
0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2,
0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25,
0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3,
0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35,
0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4,
0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45,
0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1};
call randseed(54321);
X = RandMVOrdinal(1000, P, Delta);
print first[label="First 1000 Obs: Multivariate Ordinal"];
dear dr. rick
i want to ask you regarding this program i conducedt this program and got on data after then i close the sas page ans save the conmand and i returned to open this program and press on run i saw some errors can you help me to know what is the problem .
regards
proc iml;
load module=_all_; /* load the modules */
/* P1 P2 P3 p4 p5 p6 p7 p8 p9 p10 */
P = {0.35 0.50 0.20 0.10 0.10 0.30 0.20 0.25 0.15 0.20,
0.30 0.10 0.20 0.30 0.20 0.20 0.40 0.05 0.45 0.10,
0.15 0.20 0.35 0.25 0.50 0.20 0.25 0.55 0.10 0.10,
0.20 0.20 0.25 0.35 0.20 0.30 0.15 0.15 0.30 0.60};
/* expected values and variance for each ordinal variable */
Expected = Mean(P) // Var(P);
varNames = "X1":"X10";
print Expected[r={"Mean" "Var"} c=varNames];
/* test the RandMVOrd function */
Delta = {1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05,
0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15 0.1,
0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2 0.15,
0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25 0.2,
0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3 0.25,
0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35 0.3,
0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4 0.35,
0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45 0.4,
0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1 0.45,
0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 1};
call randseed(54321);
X = RandMVOrdinal(1000, P, Delta);
/* print results */
c=varNames;
create MVO from X[colname=c]; append from X; close MVO;
quit;
dera dr. rick
i wait your answer please help me.
regards
dear dr. rick
i want to know how can i set the value of X please.
regards
This is a community forum, not a personal help site, so please address your comments to the community.
I have given you lots of help on this problem and I encouage you to read, study, and experiment in order to solve any remaining issues that you have. Other experts might offer assistance if they have time.
I am currently on vacation and out of the office until January.
thank you so much for your support to me and i am sorry to write your name in this forum because you only answer me.
i conducted this program before three days and i got on data for multivariate ordinal and binary data but now i cannot get on data why i dont know i saw your book and sas help and i think i wrote this program exatly "the problem in value of X how can i write a quation of X to get on data i wish to write to me how can i correct this program.
merry christmas and happy new year
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.