cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
rinosaur
Level I

Nonlinear regression using vba automation

Hello,

 

I currently have a working JMP script which automatically fits my raw data using a predictor formula 

 

fit1 = Nonlinear(
Y( :Name( "-60" ) ),
X( :Formula ),
Iteration Limit( 100 ),
Newton,
Finish
);
fit1 << Prediction Formula;
fit1 << Close Window;

 

I am now trying to automate this side of things from Excel using VBA. Is it possible to automatically run this non linear regression using vba and paste the resulting fitted data back into excel?

 

Thank you very much,

1 REPLY 1
Byron_JMP
Staff

Re: Nonlinear regression using vba automation

maybe have your VBA script run a JSL script like this?

 


Names Default To Here( 1 );
dt = Open(
	"$SAMPLE_DATA/Nonlinear Examples/US Population.jmp"
);
//dt<<set name("Some Data");
obj = Nonlinear( Y( :pop ), X( :Name( "X-formula" ) ) );
obj << Newton;
obj << Finish;
obj << Prediction Formula;
obj << Close Window;
Create Excel Workbook(
	"/User/Examples/DATA FROM JMP.xlsx",
	{"Some Data"},
	{"Data From JMP Non-Linear Fit"}
);

This saves a JMP table as an Excel Workbook and gives you the flexibility to write a tab name as well as the file name.

 

JMP Systems Engineer, Health and Life Sciences (Pharma)