home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 May / macformat-024.iso / Shareware City / Science / Survival Folder / Macros / MacroTest.macros next >
Encoding:
Text File  |  1994-07-11  |  2.7 KB  |  191 lines  |  [TEXT/MJUA]

  1. MACRO 'Macro_Covariate'
  2.  
  3. begin
  4.  
  5.     RESET;
  6.     GETDATA('Put here the path to acces the file');
  7.     setStatus(1);
  8.     setTime(2);
  9.     selectVar(3, 4);
  10.     setLabel(3 : 'edad'; 4 : 'grado');
  11.     covariates(80.5, 4);
  12.     graphplot(true);
  13.     backColor('negro');
  14.     estimate;
  15. end;
  16.  
  17.  
  18. MACRO 'Macro_Strata'
  19.  
  20. begin
  21.  
  22.     reset;
  23.     getdata('Put here the path to acces the file');
  24.     setStatus(1);
  25.     setTime(2);
  26.     setStrata(3, 5);
  27.     graphplot(true);
  28.     backColor('negro');
  29.     setOutput('basal');
  30.     estimate;
  31. end;
  32.  
  33.  
  34. MACRO 'Macro_Test1'
  35. var
  36.     i: integer;
  37.  
  38. begin
  39.     reset;
  40.     getdata('Put here the path to acces the file');
  41.     setStatus(1);
  42.     setTime(2);
  43.     graphPlot(false);
  44.     setOutput('ninguna');
  45.     for i := 3 to 5 do
  46.         begin
  47.             selectVar(i);
  48.             estimate;
  49.         end;
  50. end;
  51.  
  52. MACRO 'Macro_Test2 [T]'
  53. var
  54.     i, row, column, nvar: integer;
  55.  
  56. begin
  57.     reset;
  58.     getdata('Put here the path to acces the file');
  59.     get(row, column, nvar);
  60.     setStatus(1);
  61.     setTime(2);
  62.     graphPlot(false);
  63.     setOutput('ninguna');
  64.     for i := 3 to 5 do
  65.         begin
  66.             set ( row , column , 0 );
  67.             selectVar(i);
  68.             estimate;
  69.         end;
  70. end;
  71.  
  72. MACRO 'Macro_CutPoint'
  73.  
  74. begin
  75.  
  76.     reset;
  77.     getdata('Put here the path to acces the file');
  78.     setStatus(1);
  79.     setTime(2);
  80.     setCutPoint(70.5, 3);
  81.     graphplot(true);
  82.     backColor('blanco');
  83.     setOutput('basal');
  84.     estimate;
  85. end;
  86.  
  87. macro 'Macro_MakeBins'
  88.  
  89. begin
  90.  
  91.     reset;
  92.     getdata('Put here the path to acces the file');
  93.     setStatus(1);
  94.     setTime(2);
  95.     MakeBins(3, 3, true, 60, 70, 80);
  96.     setStrata(4,3);
  97.     graphplot(true);
  98.     backColor('negro');
  99.     estimate;
  100. end;
  101.  
  102. MACRO 'Macro_Select'
  103.  
  104. var
  105. edad,status,grado,stage:integer
  106.  
  107. begin
  108. edad:= 3;
  109. status:= 1;
  110. grado:= 4;
  111. stage:= 5;
  112.     RESET;
  113.     GETDATA('Put here the path to acces the file');
  114.     SETSTATUS(1);
  115.     SETTIME(2);
  116.     SELECTIF((rData[4] = 2) and (rData[5] = 3));
  117. estimate;
  118. end;
  119.  
  120. MACRO 'Macro_Omit_Compute'
  121.  
  122. var
  123. status,time,grade:integer;
  124.  
  125. begin
  126. status:= 1;
  127. time:= 2;
  128. grade:= 4;
  129.  
  130.     reset;
  131.     getdata('Put here the path to acces the file');
  132.     setStatus(1);
  133.     setTime(2);
  134.     OMITIF((rData[1] = 1) and (rData[2] < 180));
  135.  COMPUTE
  136.       rData[2] := rData[2] - 180;
  137.     end;
  138.     SELECTIF(rData[2] > 0);
  139.     graphplot(true);
  140.     backColor('blanco');
  141.     estimate;
  142. end;
  143.  
  144. MACRO 'Macro_Recode'
  145.  
  146. var
  147. grado,stage:integer;
  148.  
  149. begin
  150.     grado:= 4;
  151.  stage:= 5;
  152.     reset;
  153.     getdata('HD80:Mrp Project:Data:Ejemplo.surv');
  154.     setStatus(1);
  155.     setTime(2);
  156.     recode(grado:1:2;stage:2:3:9);
  157.     MakeBins(3, 3, true, 60, 70, 80);
  158. end;
  159.  
  160. MACRO 'Macro_Compute'
  161.  
  162. var
  163. grado,stage,time:integer;
  164.  
  165. begin
  166.  time:= 2;
  167.     grado:= 4;
  168.  stage:= 5;
  169.     reset;
  170.     GETDATA('HD80:Mrp Project:Data:Ejemplo.surv');
  171.     SETSTATUS(1);
  172.     SETTIME(2);
  173. beep;
  174.     COMPUTE
  175. {access to vars in data file with rDAta[]}
  176. {access to selected vars for current test with rVar[]}
  177.  if (rDATA[4] = 2) and (rDATA[2] > 350) then rDATA[5]:= 9 else rDATA[5]:= -1;
  178.     rData[6]:= -9;
  179.         end;
  180.     MAKEBINS(3, 3, true, 60, 70, 80);
  181.  SETSTRATA(4,3);
  182.     beep;
  183.  ESTIMATE;
  184. end;
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.