Questions tagged [sas-iml]

SAS/IML is the matrix programming language component to SAS (similar to R).

SAS/IML is the matrix language component of SAS software. It interfaces with the base SAS programming environment, allowing you to smoothly transition from matrix operations to dataset operations, and to use SAS' full suite of statistical tools while enjoying the power of a fully featured matrix language.

SAS/IML also allows an interface into R, to allow users to take advantage of the power of SAS while maintaining the flexibility of using R packages as well.

For more information see http://www.sas.com/technologies/analytics/statistics/iml/index.html

98 questions
0
votes
2 answers

Using proc iml to do monte carlo integration

proc iml; call randseed(4545); * initialize the stream (like streaminit); x = J(5000,1,.); * pre-allocate space for random numbers; call randgen(x,'normal',0,1); * fill x with N(0,1) deviates; y = y + (x**2 - 3*x**3 + 5x < 1); p = y / 5000; * MEAN…
0
votes
1 answer

Encoutering an error 'run executed for function module' while calling function

I wrote one module in proc iml and trying to call it using call fuctiong and supplied parameters. But its throwing the erorr: run executed for function module. Any suggestion?
munish bansal
  • 67
  • 3
  • 11
0
votes
0 answers

Turn off results in PROC IML in SAS

We can turn off/on the results by doing ods noresults; ods results; However, if you are within PROC IML, and you write that, you are sent out of the procedure, and you have to repeat all again. How do avoid that, i.e. how to turn on/off the…
0
votes
1 answer

Capturing Return Code from R in SAS IML

I have a submit /r; block in IML. 95% of the time, things run correctly. The other times there is an ERROR in R. My log shows ERROR: R: When an error occurs, the outputs are not available. Is there a way to trap…
DomPazz
  • 12,415
  • 17
  • 23
0
votes
1 answer

Nested Scope in IML Modules

How does nested scope in IML modules work? I am trying to create a module for optimization. It contains other modules. The inner modules need access to the local scope outer module, because of how the optimization functions in IML work. Here is…
DomPazz
  • 12,415
  • 17
  • 23
0
votes
1 answer

SAS to R configuration through IML

Looking to submit statements from SAS to R through the [submit/R] [endsubmit] statements. I am running version 9.3 and have modified the sasV9.cfg file to include the -RLANG statement. However, when I run the following code proc options…
user2891099
  • 125
  • 1
  • 9
0
votes
1 answer

SAS Proc IML: Do Loop to Populate a Matrix

I have the following code that works great in MATLAB and I which to transpose in SAS/PROC IML: [row col] = size(coeff); A_temp = zeros(row,col); for i = 1: row/6 A_temp(6*(i-1)+1:6*i,:) = coeff(6*(i-1)+1:6*i,4:col);end; In Proc…
Plug4
  • 3,838
  • 9
  • 51
  • 79
-1
votes
1 answer

Create matrices based on a reference table and separate data table sas iml

I have a parametrization table that mentions whether the (i,j) th element of "matrix 1" is zero, residual of the row sum or has to be read from the data table. I also have a data table with all the values for different segments. How do I construct…
souravsarkar59
  • 127
  • 1
  • 1
  • 8
1 2 3 4 5 6
7