[proFit-list] n00b question on multiple regression setup

Davide Guarisco guarisco at sbcglobal.net
Fri Dec 10 22:45:51 CST 2010


On Dec 10, 2010, at 8:22 AM, Don Camaioni wrote:

> The old way of doing this in pro Fit was to put your values for gal, spl, spl2 and spl3 in separate columns, e.g., 1,2,3,4. Define the index column as the x-variable and gal column as y-variable.  Then program your function as follows:
> 
> begin
>  y :=  a[1] + a[2]*data[x,2] + a[3]*data[x,3]+a[4]*data[x,4]
> end
> 
> ––––––––––––––––––––––––––––––––
> Don Camaioni
> Pacific Northwest National Laboratory
> 
> 
> 
> On Dec 10, 2010, at 7:43 AM, Dave wrote:
> 
>> Hi all,
>> 	I have to do a multiple regression fit for an equation, and I think the way to do it is by using pro Fit's "Multiple Fit" functionality. I tried to set things up similar to the examples in the help, but I'm clearly missing something. The equation who's parameters I want to find is:
>> 
>> gal = a0 + a1*spl + a2*spl2 + a3*spl3
>> 
>> I have data columns for gal, spl, spl2 and spl3. I'm trying to find a0,a1,a2, and a3. I've been told that the spls are the independent variables in this case and the gal is the dependent variable, and I've tried to set up a function(see below) in this vein that describes this, but when I do it the "multidimensional fitting" dialog box and scheme shows y as the output, gal as fitted, and the spls as not fitted.
>> 
>> Am I barking up the wrong tree here, or what am I doing wrong? Something tells me I'm defining stuff incorrectly, but I can't glean from the examples how to do it right.
>> 
>> Thanks for any help.
>> 
>> Dave
>> 
>> 
>> function Get(spm,spm2,spm3,gal);
>> 	inputs
>> spm := 0 , inactive, 'spl';
>> spm2:= 0 , inactive, 'spl2';
>> spm3:= 0 , inactive, 'spl3';
>> gal := 0, active,'gal';
>> begin
>> gal := (spm + spm2 + spm3);
>> end;
>> _______________________________________________
>> proFit-list mailing list
>> proFit-list at quantum-soft.com
>> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
> 
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com



Try

function model;

inputs
	a[1]:=0,active,'a0';
	a[2]:=1,active,'a1';
	a[3]:=1,active,'a2';
	a[4]:=1,active,'a3';
	a[5]:=1,inactive,'spl';
	a[6]:=1,inactive,'spl2';
	a[7]:=1,inactive,'spl3';
	
begin
	y:=a[1]+a[2]*a[5]+a[3]*a[6]+a[4]*a[7];
end;




      Davide
--
Davide Guarisco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20101210/503d1f66/attachment.html>


More information about the proFit-list mailing list