I am doing a permutation test and i have gone as far as getting difference of the means using proc ttest. My next step is proc iml and thats where am stuck.
i keep getting the following error message on the log:
106 ods output off;
What am i doing wrong?
thanks
Fix your errors in the order they come, since errors cascade.
WARNING: Variable cash excluded because of type mismatch with x.
Fix this first, likely the variable 'cash' is character when it should be numeric.
No "cash" is numeric. and school is a character variable.
Post the actual code you're referencing. Make sure it runs with their data and then switch to your data.
*borrowed code from internet ... randomizes observations and creates a matrix ... one row per randomization ;
proc iml;
use pocketcash; * change data set name here to match your data set name above;
read all var{school cash} into x; *change varibale names here ... make sure it is class then var ... in that order.;
p = t(ranperm(X[,2],1000)); *Note that the "1000" here is the number of permutations. ;
paf = x[,1]||p;
create newds from paf;
append from paf;
quit;
Not sure why its posting with the breaks but i hope it makes sence to you,
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.