## Proc FCMP: getting missing values with call mult

Solved
Frequent Contributor
Posts: 99

# Proc FCMP: getting missing values with call mult

Hi all,

I tried to run a ols using proc fcmp. I get a missing SSCP matrix. Hence the program doesnot run.

I appreicate all the help.

Regards,

Amit

code:

data temp;

set sashelp.cars;

keep MPG_City Horsepower Cylinders Weight Length;

run;

proc fcmp;

/* Allocate spaces for matrices */

array input[428, 5] / nosym;

array y[428] / nosym;

array x[428, 4] / nosym;

array xtrans[4, 428] / nosym;

array sscp[4, 4] / nosym;

array sscpinv[4, 4] / nosym;

array beta[4] / nosym;

array xtrans_y[4, 1] / nosym;

/* Input simulation dataset */

rc1 = read_array("temp", input, "MPG_City", "Horsepower", "Cylinders", "Weight", "Length");

rc3 = read_array("temp", x, "Horsepower", "Cylinders", "Weight", "Length");

/* Calculate OLS regression coefficients */

call transpose(x, xtrans);

call mult(xtrans, x, sscp);

call inv(sscp, sscpinv);

call mult(xtrans, y, xtrans_y);

call mult(sscpinv, xtrans_y, beta);

/* Output resulting matrix as dataset */

rc44 = write_array("sscp1", sscp);

rc46 = write_array("xtrans_y1", xtrans_y);

rc4 = write_array("result", beta);

if rc1 + rc2 + rc3 + rc4 > 0 then put 'ERROR: I/O error';

else put 'NOTE: I/O was successful';

quit;

Accepted Solutions
Solution
‎08-21-2012 12:54 PM
Posts: 1,303

## Re: Proc FCMP: getting missing values with call mult

The cylinders column has two missing values, that would cause your issue.

All Replies
Solution
‎08-21-2012 12:54 PM
Posts: 1,303

## Re: Proc FCMP: getting missing values with call mult

The cylinders column has two missing values, that would cause your issue.

🔒 This topic is solved and locked.