cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to perform matrix operations?

Hello! I am learning multiple linear regression using matrix form. I wondered if there is a way to transform the data into matrix form and perform operations such as transpose, multiplication, and inverse, to find the coefficients. I appreciate your help!

2 REPLIES 2

Re: How to perform matrix operations?

Yes, JMP contains significant support for matrices in the scripting language. I suggest using the online document for matrices in JSL. I also suggest using the Help > Scripting Index > Functions > Matrix to discover or verify syntax.

 

mat.PNG

David_Burnham
Super User (Alumni)

Re: How to perform matrix operations?

Here is some sample code:

 

// generate matrices
X = Column("height") << Get Values;
Y = Column("weight") << Get Values;
// add a column of 1's for the intercept term
X = J(Nrow(X),1) || X; 
// compute least squares estimates
β = Inv(X`*X)*X`*Y;
-Dave

Recommended Articles