Re: Converting confidence interval to p value



I'm using lsqcurvefit to fit a non-linear model to my time series data.
The command looks like this:
%Fitting:
[beta,resnorm,r,e,o,l,J]=lsqcurvefit('mymodel',[1 200], ti,data,[0 0],[3
1000],options,tau);
% Compute confidence interval:
ci = nlparci(beta,r,'jacobian',J);

Can someone tell me what steps to take from here to represent the
"goodness of fit" as a statistic, like a p-value?

Brad, you want a p-value for testing what?

Perhaps you want to test whether your fitted model fits better than a
simpler model that is a special case. For example, the model where the
response (y) variable is constant may be a special case of your model with
parameter set to certain values, and you may wonder whether your model is an
improvement over that.

Are any of your parameter estimates at the lower or upper bounds you
entered? If so, that would likely invalidate any of the ideas I'll try to
give here. I'm going to be sketchy with the details, but I may be able to
provide more information if I understand better what you want.

1. You could fit the simpler model and measure the increase in sum of
squares compared with your model. Then you could do an F test. Standard
references should provide information about how to do that.

2. You could use the J and r values to compute an estimate of the
covariance matrix for the coefficient estimates. Then you could use the
linhyptest function to test whether the true coefficient values (or a subset
of them) could be equal to specific values that you specify.

3. Suppose one of your parameters is just a constant term, and the other is
the one you're really interested in testing. Then a test just on that
parameter may be what you need. You could adjust the 'alpha' input to
nlparci until the confidence interval endpoint just touches the value that
interests you, say the value 0. Then you could use that as your p-value.

On reason I am vague is because I don't understand what type of function you
are fitting and what type of test you want. So I don't even know if you'd
want to test one or both parameters.

One last thing. You mention "goodness of fit" statistic. People use that
phrase in various ways, but not usually to describe a p-value for testing a
regression. Sometimes they mean something like R-square. You can compute
that easily by applying the definition, using the sum of squares of r and
the sum of squared deviations of "data" from its mean. Other times they mean
a statistic that might, for example, measure how well the residuals seem to
follow a normal distribution.

If this doesn't help, I'd welcome more details about what you need.

-- Tom


.



Relevant Pages

  • Re: Converting confidence interval to p value
    ... "goodness of fit" as a statistic, ... you want a p-value for testing what? ... squares compared with your model. ... are fitting and what type of test you want. ...
    (comp.soft-sys.matlab)
  • Re: Least Squared Best Double Fit
    ... Least Squares Best Fit Methods are well known for a point, ... line, a circle, a conic section, in general: ... Does fitting TWO points mean multiple objective functions? ...
    (sci.math.num-analysis)
  • Re: Relative Goodness-of-fit, New Technique
    ... which is a score ranging between 100 for the exact fit and 0 for the ... residuals, thereby it will not be biased towards minimizing least ... always biased to the least squares). ... Distance fitting and Least Absolute Deviation fitting, ...
    (sci.physics)
  • Re: Least Squared Best Double Fit
    ... Least Squares Best Fit Methods are well known for a point, ... line, a circle, a conic section, in general: ... Does fitting TWO points mean multiple objective functions? ...
    (sci.math.num-analysis)
  • Re: HELP: Non-linear regression problem
    ... I am fitting experimental data y as a function of x, with parameters, c and h. ... The model fit would be more sensitive to changes in h than to changes in k, so you would indeed expect a smaller p-value for h. ... when the likelihood surface is not symmetrical around the ML ...
    (sci.stat.math)