Re: problem with leasqr fitting

przemek klosowski via Help-octave <[email protected]>
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
If you plot (temp,intensity,temp,f2) it does a so-so job of fitting your 
data. Are you concerned about corp1 and covp1?

Your model does not seem to conform very well with the data, so probably 
the minimum is very shallow and parameters are poorly correlated.

NB, the code uses data-smoothing and signal packages, so they need to be 
loaded to replicate.

On 3/18/21 9:07 AM, mrodrig via Help-octave wrote:
> Hello,
>
> I am trying to perform a fitting and I am obtaining the following results
> pfit1 =
>
>     375.11773
>      83.26345
>       0.29860
>
> kvg = 1
> iter =  3
> corp1 =
>
>      NA    NA    NA
>      NA    NA    NA
>      NA    NA    NA
>
> covp1 =
>
>      NA    NA    NA
>      NA    NA    NA
>      NA    NA    NA
>
> I attach the data for consideration
>
> thanks
>
> datam= xlsread ('data1.xlsx');
>
> temp=datam(1:173,1)+273;
> [intensity, lambda] = regdatasmooth (temp, datam(1:173,2));
>
> k=8.6170e-005;
>
> [pks, loc]=findpeaks (intensity,"DoubleSided");
>
> imaxi=intensity(loc(index=find(pks==max(pks))));
> tmaxi=temp(loc(index=find(pks==max(pks))));
>
>
> eacti1= 0.2;
>
> parTLi1 = [tmaxi,imaxi,eacti1];
>
> F1=@(temp,parTLi1)(imaxi*exp(1+parTLi1(3)./(k*temp).*(temp-parTLi1(1))/parTLi1(1)-temp.^2/parTLi1(1).^2*(1-(2*k*parTLi1(1))/parTLi1(3)).*exp(parTLi1(3)./(k*temp).*(temp-parTLi1(1))/parTLi1(1))-(2*k*parTLi1(1)/parTLi1(3))));
>
> wt_tl=ones(size(temp));
> iter_tl=800;
> tol_tl=0.1;
> dFdp_tl="dfdp";
> dp_tl=0.0001*ones(size(parTLi1));
>
> %tolerance
> tmax_max=tmaxi+2;
> tmax_min=tmaxi-2;
> imax_max=imaxi+100;
> imax_min=imaxi-100;
> eact_max=1.3;
> eact_min=0.5;
>
> bounds= [tmax_min,tmax_max; imax_min, imax_max; eact_min,eact_max];
>
>
> f2=0;
>
> [f2, pfit1, kvg, iter, corp1, covp1, covr1,r2] = leasqr (temp, intensity,
> parTLi1, F1,tol_tl, iter_tl,wt_tl, dp_tl, dFdp_tl, bounds)
>
> data1.xlsx <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Foctave.1599824.n4.nabble.com%2Ffile%2Ft372706%2Fdata1.xlsx&amp;data=04%7C01%7Cprzemek.klosowski%40nist.gov%7C7140ad0b30644b3b3e9608d8ea0eebbd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637516697097434860%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=PnQRU2pg4DSKxlDYcKh8aWz3ipcJtgGP3mCr%2BfiuE08%3D&amp;reserved=0>
>
>
>
>
> --
> Sent from: https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Foctave.1599824.n4.nabble.com%2FOctave-General-f1599825.html&amp;data=04%7C01%7Cprzemek.klosowski%40nist.gov%7C7140ad0b30644b3b3e9608d8ea0eebbd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637516697097444816%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=xGCVHPn%2FtM39xpmVkomnAG54krmlDJ4vSbxQim8Pbp0%3D&amp;reserved=0
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.