Automate nonlinear analysis across groups specified by "By" variableI 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?
Re: Automate nonlinear analysis across groups specified by "By" variableAnd (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));Re: Automate nonlinear analysis across groups specified by "By" variableHere 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)
);Re: Automate nonlinear analysis across groups specified by "By" variableThanks, but how would I do the analysis By "Plant type", so that the gaussian fit is done separately for the hundreds of plant types?
Re: Automate nonlinear analysis across groups specified by "By" variableYou 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 );