Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Automate nonlinear analysis across groups specified by "By" variable

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Jul 15, 2017 4:26 PM
(4311 views)

I am performing a nonlinear anlysis (Specialized modeling, nonlinear) on a large plant growth dataset made up of hundreds of types of plant. In the nonlinear platform, the Y is plant size, the X is time, and I want to do this analysis "By" plant type. This leads to hundreds of "fit curve" boxes in which I would have to specify further anlalyses. Instead, I would like to automate this process, by fitting the peak model "fit gaussian peak" in every case. I would then create a combined table with all of the (hundreds) of estimated parameter values.

Can anyone please advise on whether I can automate this process to run hundreds of "fit gaussian peak" models at the same time?

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Here is the same example, but with a "By" clause. All of this is available in the Scripting Index.

Help==>Scripting Index==>Fit Curve

The Scripting Index and the Scripting Guide are the definitive publications that contain the definative information on JSL.

```
Fit Curve( Y( :height ), X( :weight ),
Fit Gaussian Peak,
by(:sex)
);
```

Jim

4 REPLIES 4

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Automate nonlinear analysis across groups specified by "By" variable

You need to run your analysis interactively and then save the script, and you will get the code to Fit Gaussian Peak

`Fit Curve( Y( :height ), X( :weight ), Fit Gaussian Peak );`

Jim

Highlighted
##

Thanks, but how would I do the analysis By "Plant type", so that the gaussian fit is done separately for the hundreds of plant types?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Automate nonlinear analysis across groups specified by "By" variable

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Here is the same example, but with a "By" clause. All of this is available in the Scripting Index.

Help==>Scripting Index==>Fit Curve

The Scripting Index and the Scripting Guide are the definitive publications that contain the definative information on JSL.

```
Fit Curve( Y( :height ), X( :weight ),
Fit Gaussian Peak,
by(:sex)
);
```

Jim

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Automate nonlinear analysis across groups specified by "By" variable

And (building on Jim's example) you can get the parameter estimates into a table like this:

```
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
fc = dt << Fit Curve( Y( :height ), X( :weight ), Fit Gaussian Peak, by(:sex));
// Get all the parameter estimates into a single table
firstRep = Report(fc[1]);
dt2 = firstRep[TableBox(3)] << makeCombinedDataTable;
dt2 << setName("Parameter Estimates from "||(dt << getName));
```