## How do I fit an equation?

I have to a model

threshold = 100 -2*deltat + c1*sigma^a + c2*deltat^2 + c3*sigma^c * deltat^d

where I know 0<threshold<100 as it is in all my datapoints (https://pastebin.com/3pYiNFf1)

To do this I run the following code (and I am fully aware this approach is incredibly stupid/ridiculous but I can't think of anything better) using the nlmixed procedure with as model the binomial distribution with 100 trials, and succes chance hopefully threshold/100.

PROC NLMIXED data=BEP;
PARMS c1=-1, c2=0, c3=0, a=1, b=1, c=1, d=1;
p = (100 - 2*deltat + c1*sigma**(a) + c2*deltat**(b) + c3*sigma**(c) * deltat**(d))/100;
model threshold ~ binomial(100,p);
run;

However when running this I get no output and the log says

NOTE: Execution error for observation 1.
NOTE: The SAS System stopped processing this step because of errors.

Although I do get results if I remove the parameters a,b,c,d, I don't get any results when I include them.

This was run using SAS university edition version 3.8
1 ACCEPTED SOLUTION

Accepted Solutions  PGStats
Opal | Level 21

## Re: How do I fit an equation?

Run NLMIXED with option trace to get debug info. The problem is related to cases where sigma=0. NLMIXED is trying to take the log of sigma and fails. You can get convergence by replacing sigma=0 by sigma=0.01.

With sigma=0.01, the results indicate that your model is overparameterized, likely because of the two terms involving sigma with different exponents. Just a guess.

PG  PGStats
Opal | Level 21

## Re: How do I fit an equation?

Run NLMIXED with option trace to get debug info. The problem is related to cases where sigma=0. NLMIXED is trying to take the log of sigma and fails. You can get convergence by replacing sigma=0 by sigma=0.01.

With sigma=0.01, the results indicate that your model is overparameterized, likely because of the two terms involving sigma with different exponents. Just a guess.

PG
Discussion stats