<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to write 150 values in one column to be 150 data set in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646484#M193404</link>
    <description>&lt;P&gt;Hello, all, I think the problem that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/304931"&gt;@superbug&lt;/a&gt; is trying to solve is the same one as his other thread at &lt;A href="https://communities.sas.com/t5/SAS-Programming/how-to-write-code-for-1-parameter-logistic-model/m-p/646483#M193403" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/how-to-write-code-for-1-parameter-logistic-model/m-p/646483#M193403&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that thread, as this one, there is not yet (in my opinion) a complete explanation of all the steps. Further, he wants a macro to do this even though that is necessary. Apparently he also thinks that 150 data sets would work, when one data set would work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Superbug, you don't need a macro, you don't need many data sets, you need one data set. A single SAS data set can do everything you want, without macros, without do loops (a data set is an implied do-loop, did you know that?) To ask for a macro in this case, or to ask for many data sets, only confuses the matter further. So again, I ask you to give a clear explanation of your problem (as I asked in your other thread), in sufficient detail such that someone can write a program to solve the problem.&lt;/P&gt;</description>
    <pubDate>Sun, 10 May 2020 10:07:10 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2020-05-10T10:07:10Z</dc:date>
    <item>
      <title>How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646439#M193374</link>
      <description>&lt;P&gt;As in the attach "item.csv", I have a file contains two variables, "itemid" and "bpar". There are 150 values of bpar.&amp;nbsp; I want to write each bpar value as a data set. The following is my trial, but there is &lt;STRONG&gt;error in the macro part.&lt;/STRONG&gt;&amp;nbsp;Any help would be appreciated. Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc import out=item&lt;BR /&gt;datafile = "...\item.csv"&lt;BR /&gt;dbms = csv;&lt;BR /&gt;getnames = yes;&lt;BR /&gt;run; quit;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%macro dat_output(dat);&lt;BR /&gt;data %do i = 1 %to 150; bpar&amp;amp;i.&lt;BR /&gt;if count=i;&lt;BR /&gt;%end;&lt;BR /&gt;set &amp;amp;dat;&lt;BR /&gt;%do j = 1 %to 150;&lt;BR /&gt;output b&amp;amp;j.;&lt;BR /&gt;%end;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;%mend dat_output;&lt;/P&gt;
&lt;P&gt;%dat_output(item);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 01:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646439#M193374</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T01:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646441#M193376</link>
      <description>&lt;P&gt;I added a "count" variable in the "item_new.csv" file to refer to the "count" indicator in the macro. Please refer this "item_new.csv" if you could help. thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 02:14:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646441#M193376</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T02:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646442#M193377</link>
      <description>&lt;P&gt;Please show the SAS code you are trying to create, without ANY macro logic or macro variables.&amp;nbsp; Just do it for 2 or 3 values.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you get that to work then you can begin to think about how you might use the macro language to generate that code for 3 or 150 or 10,000 values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a good reason to create 150 datasets?&amp;nbsp; Or is the actual need to create 150 reports or 150 text files or 150 excel sheets?&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 02:16:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646442#M193377</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-05-10T02:16:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646444#M193379</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks a lot for your reply!&lt;/P&gt;
&lt;P&gt;The reason I need to create 150 data is because I need to use these values to calculate 150 probabilities in later steps.&lt;/P&gt;
&lt;P&gt;I understood I should try 1 or 2 values before writing macro.&lt;/P&gt;
&lt;P&gt;I tried the following, but I have been stucked by writing macro. Could you please help write them in a macro?&amp;nbsp; Thanks much!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data bpar1;&lt;/P&gt;
&lt;P&gt;set item;&lt;/P&gt;
&lt;P&gt;if count=1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data bpar2;&lt;/P&gt;
&lt;P&gt;set item;&lt;/P&gt;
&lt;P&gt;if count=3;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 02:32:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646444#M193379</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T02:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646447#M193381</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the following macro, but there are error messages. I don't know how to correct the code. could you please help?&lt;/P&gt;
&lt;P&gt;%macro f1;&lt;BR /&gt;%do i=1 %to 2;&lt;/P&gt;
&lt;P&gt;data par&amp;amp;i;&lt;BR /&gt;set item;&lt;BR /&gt;if count=&amp;amp;i;&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;BR /&gt;%end;&lt;BR /&gt;%mend;&lt;BR /&gt;%f1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;error message:&amp;nbsp;161: LINE and COLUMN cannot be determined.&lt;BR /&gt;NOTE: NOSPOOL is on. Rerunning with OPTION SPOOL might allow recovery of the LINE and COLUMN&lt;BR /&gt;where the error has occurred.&lt;BR /&gt;ERROR 161-185: No matching DO/SELECT statement.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 02:46:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646447#M193381</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T02:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646448#M193382</link>
      <description>&lt;P&gt;How are you calculating the probabilities? Why not just add BY COUNT to that step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The error message is pretty clear.&amp;nbsp; You have an END statement without a DO statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note you can make all of the datasets in one pass (if you really need them) which can save a lot of time if the file is large.&lt;/P&gt;
&lt;P&gt;You could use IF/THEN/ELSE pattern or SELECT /WHEN instead.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data par1 par2 par3;
  set item;
  if count=1 then output par1;
  else if count=2 then output par2;
  else if count=3 then output par3;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 May 2020 03:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646448#M193382</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-05-10T03:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646450#M193383</link>
      <description>&lt;P&gt;Try next code after importing the csv file:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
 set item;
     line = cats("data bpar",trim(_N_),"; bpar=",bpar,";run;");
     call execeute(line);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or replace the import step into next code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_'
  infile ".../item.csv" dlm=",";
  input itemid $ bpar;
     line = cats("data bpar",trim(_N_),"; bpar=",bpar,";run;");
     call execeute(line);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you need the itemid too in the files then just add the&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &lt;STRONG&gt;"; itemid=", itemid,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;inside the line to be concatenated;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 03:28:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646450#M193383</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-05-10T03:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646464#M193394</link>
      <description>&lt;P&gt;Question #1: why do you want to split the dataset in the first place. In 90% of cases, using by or where on the dataset is more appropriate.&lt;/P&gt;
&lt;P&gt;So please tell us what you want to achieve.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 06:44:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646464#M193394</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-10T06:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646484#M193404</link>
      <description>&lt;P&gt;Hello, all, I think the problem that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/304931"&gt;@superbug&lt;/a&gt; is trying to solve is the same one as his other thread at &lt;A href="https://communities.sas.com/t5/SAS-Programming/how-to-write-code-for-1-parameter-logistic-model/m-p/646483#M193403" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/how-to-write-code-for-1-parameter-logistic-model/m-p/646483#M193403&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In that thread, as this one, there is not yet (in my opinion) a complete explanation of all the steps. Further, he wants a macro to do this even though that is necessary. Apparently he also thinks that 150 data sets would work, when one data set would work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Superbug, you don't need a macro, you don't need many data sets, you need one data set. A single SAS data set can do everything you want, without macros, without do loops (a data set is an implied do-loop, did you know that?) To ask for a macro in this case, or to ask for many data sets, only confuses the matter further. So again, I ask you to give a clear explanation of your problem (as I asked in your other thread), in sufficient detail such that someone can write a program to solve the problem.&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 10:07:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646484#M193404</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-05-10T10:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646496#M193412</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set sashelp.class ;
  call execute(cat('data ',name,';set sashelp.class(where=(name="',name,'"));run;'));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 May 2020 11:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646496#M193412</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-05-10T11:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646500#M193416</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you all so much for your reply. I very much appreciate your time!&lt;/P&gt;
&lt;P&gt;My condition is like this, I have a test contains 150 items, each of the item &lt;STRONG&gt;will be&lt;/STRONG&gt; dichotomously coded as 0, 1, that is, if examinee get one item correct, then the examinee get 1 point, otherwise, the examinee get 0 point, so the raw score range is [0, 150] for this whole test. &lt;STRONG&gt;Before this test is being administered&lt;/STRONG&gt;, I need to calculate the examinee estimated ability corresponding to each raw score. Higher raw score means examinee has higher ability, lower raw score means examinee has lower ability.&lt;/P&gt;
&lt;P&gt;To get what I wanted, I need to calculate the probability of&amp;nbsp; examinee correctly answering an item given a certain ability level. Corresponding to 150 items, there will be 150 probabilities. The summation of all those 150 probabilities is called “TCC”. &amp;nbsp;I have a criteria delta=0.000001, when the difference between TCC and raw score is close to this criteria delta, the iteration will stop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;All the information I have is item difficulty parameter (please see the attached "ITRDATA.csv") and the following SPSS syntax. I need to get a raw to theta conversion table (please see the “raw to theta conversion.csv”) using SAS. In case my explanation is confusing, I think it’s better to post the whole SPSS syntax here. I am sorry for this long syntax. Since there are some common grounds between codes, I am sure your SAS experts would have a rough idea of what do these codes mean. Again very much appreciate your help!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/*the following is the SPSS syntax*/&lt;/P&gt;
&lt;P&gt;Define !theta_raw2019 (infilenam=!TOKENS(1)/outfilenam=!TOKENS(1)/outexcel=!TOKENS(1)/ntot=!TOKENS(1)/formname=!TOKENS(1)/thetacut=!TOKENS(1))&lt;/P&gt;
&lt;P&gt;new file.&lt;/P&gt;
&lt;P&gt;SET MXLOOP=100000.&lt;/P&gt;
&lt;P&gt;MATRIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; GET IRTDATA&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /FILE=!infilenam&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /VARIABLES=iname bpar&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /NAMES=VARNAMES /MISSING=ACCEPT /SYSMIS=0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;COMPUTE NITEM=NROW(IRTDATA).&lt;/P&gt;
&lt;P&gt;COMPUTE CONVERT=MAKE(!ntot,4,0.00000).&lt;/P&gt;
&lt;P&gt;LOOP K = 1 TO !ntot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE theta_lo={-20}.&amp;nbsp; &amp;nbsp; /* initial low value of theta before iteration*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE theta_hi={20}.&amp;nbsp; &amp;nbsp; &amp;nbsp;/* initial high value of theta before iteration*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE delta={.000001}.&amp;nbsp; &amp;nbsp;/*criteria of terminating iteration, It is the difference between TCC and the corresponding raw score. &amp;nbsp;*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE cut={K}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE theta={0}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE low={theta_lo}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE hi={theta_hi}.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE IPROB=MAKE(NITEM,1,0).&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE IINFO=MAKE(NITEM,1,0).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LOOP.&lt;/P&gt;
&lt;P&gt;LOOP J=1 TO NITEM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE IPROB(J)=(exp(theta-IRTDATA(J,2))/(1+exp(theta-IRTDATA(J,2))))).&lt;/P&gt;
&lt;P&gt;&amp;nbsp; COMPUTE IINFO(J)=IPROB(J)*(1-IPROB(J)).&lt;/P&gt;
&lt;P&gt;END LOOP.&lt;/P&gt;
&lt;P&gt;COMPUTE TCC=CSUM(IPROB).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DO IF (tcc-cut&amp;gt;delta).&lt;/P&gt;
&lt;P&gt;COMPUTE hi = theta.&lt;/P&gt;
&lt;P&gt;COMPUTE theta=theta-ABS((theta-low))/2.&lt;/P&gt;
&lt;P&gt;END IF.&lt;/P&gt;
&lt;P&gt;DO IF (tcc-cut&amp;lt; (-1*delta)).&lt;/P&gt;
&lt;P&gt;COMPUTE low=theta.&lt;/P&gt;
&lt;P&gt;COMPUTE theta=theta+ABS((hi-theta))/2.&lt;/P&gt;
&lt;P&gt;END IF.&lt;/P&gt;
&lt;P&gt;END LOOP IF (abs(tcc-cut)&amp;lt;=delta).&lt;/P&gt;
&lt;P&gt;COMPUTE INFO=CSUM(IINFO).&lt;/P&gt;
&lt;P&gt;COMPUTE SE=sqrt(1/INFO).&lt;/P&gt;
&lt;P&gt;COMPUTE CONVERT(K,:)={CUT,THETA,INFO,SE}.&lt;/P&gt;
&lt;P&gt;END LOOP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAVE CONVERT&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /OUTFILE=!outfilenam.&lt;/P&gt;
&lt;P&gt;END MATRIX.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;get file=!outfilenam.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;string form (A6).&lt;/P&gt;
&lt;P&gt;compute form=!formname.&lt;/P&gt;
&lt;P&gt;rename variables (col1=raw) (col2=theta) (col3=info) (col4=stderror).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;compute probpass=(1-cdf.normal(!thetacut,theta,stderror)).&lt;/P&gt;
&lt;P&gt;execute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;save outfile=!outfilenam&lt;/P&gt;
&lt;P&gt;&amp;nbsp; /compressed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SAVE TRANSLATE OUTFILE=!outexcel&lt;/P&gt;
&lt;P&gt;/KEEP=raw theta probpass info stderror form&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/TYPE=XLS /VERSION=2 /MAP /REPLACE /FIELDNAMES .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;!enddefine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;!theta_raw2019 infilenam='….. \ABC59.sav'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outfilenam='…. \form ABC059 raw to theta.sav'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outexcel='….\form ABC059 raw to theta.xls'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ntot=149&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; formname='ABC59'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; thetacut=0.8554.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 12:58:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646500#M193416</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T12:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646559#M193453</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Thanks a lot for instructing me to get probability when theta=0, that is the initial theta starting value of iteration, I think. By the SPSS syntax above, could you please direct me how to incorporate theta_lo= -20 and theta_hi=20 this kind of information into the SAS code below to continue the iteration until reached the specified criteria?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want; &lt;BR /&gt;set IRTDATA;&lt;BR /&gt;theta=0;&lt;BR /&gt;prob = exp(theta-bpar)/(1+exp(theta-bpar));&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 May 2020 23:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646559#M193453</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-10T23:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646763#M193508</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set IRTDATA;

prev_prob=0;

do theta=-20 to 20 by 0.5 while(condition to keep looping);
prev_prob = prob;
prob = exp(theta-bpar)/(1+exp(theta-bpar));
dif = prob - prev_prob;
end;


run;

 &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Something like that maybe should get you started. I suspect PROC NLIN may be more suitable and efficient here but I'm not very familiar with that procedure.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:25:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646763#M193508</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-05-11T15:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to write 150 values in one column to be 150 data set</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646772#M193512</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks much for the suggestion!&lt;/P&gt;
&lt;P&gt;If theta interval is fixed, it will make my life easier. The challenge from me is the interval is unfixed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I very much appreciate your time!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 May 2020 15:40:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-write-150-values-in-one-column-to-be-150-data-set/m-p/646772#M193512</guid>
      <dc:creator>superbug</dc:creator>
      <dc:date>2020-05-11T15:40:21Z</dc:date>
    </item>
  </channel>
</rss>

