14.03.2014 Views

Modeling and Multivariate Methods - SAS

Modeling and Multivariate Methods - SAS

Modeling and Multivariate Methods - SAS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 9 Performing Nonlinear Regression 267<br />

Fit a Custom Model<br />

Clicking Make Formula at this point (after using Show Points) creates a new column in the data table.<br />

This column has the formula as a function of the latest parameter starting values.<br />

Note: If you click Make Formula before using the Show Graph or Show Points buttons, you are asked to<br />

provide the X <strong>and</strong> Y roles, <strong>and</strong> an optional Group role. See Figure 9.16. After that, you are brought back to<br />

the plot so you have the opportunity to adjust the parameters starting values if desired. At that point click<br />

Make Formula again to create the new column.<br />

Once the formula is created in the data table, continue the analysis by assigning the new column as the<br />

X, Predictor Formula in the Nonlinear launch dialog.<br />

Customize the Nonlinear Model Library<br />

The Model Library is created by a built-in script named NonlinLib.jsl, located in the Resources/Builtins<br />

folder in the folder that contains JMP (Windows) or in the Application Package (Macintosh). You can<br />

customize the nonlinear library script by modifying this script.<br />

To add a model, you must add three lines to the list named Listofmodellist#. These three lines are<br />

actually a list themselves, which consists of the following three parts.<br />

• Model name, a quoted string<br />

• Model formula, an expression<br />

• Model scale<br />

For example, suppose you want to add a model called “Simple Exponential Growth” that has the form<br />

y = b 1<br />

e kx<br />

Add the following lines to the NonlinLib.jsl script<br />

{//Simple Exponential Growth<br />

"Simple Exponential Growth",<br />

Expr(Parameter({b1=2, k=0.5}, b1*exp(k * :X))),<br />

lowx = -1; highx = 2; lowy = 0; highy = 2},<br />

Some things to note:<br />

• The first line is simply an open bracket (starting the list) <strong>and</strong> an optional comment. The second line is<br />

the string that is displayed in the model library window.<br />

• The values of lowx, highx, lowy, <strong>and</strong> highy specify the initial window for the theoretical graph.<br />

• There is a comma as the last character in the example above. If this is the final entry in the<br />

Listofmodellist# list, the comma can be omitted.<br />

• If the model uses more than two parameters, replace the last line (containing the graph limits) with the<br />

quoted string “String Not Available”.<br />

To delete a model, delete the corresponding three-lined list from the Listofmodellist# list.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!