Can you write out your model equations, so that we can better understand what you are doing.
Thanks.
I have a linear regression for Y on X, and a power regression for Z on Y, each having associated error. (the Y values are different (independent) in each case). I have combined the equations to model Z as a function of X.
What I want is a confidence envelope around the model estimates of Z.
Thanks,
Can you write out your model equations, so that we can better understand what you are doing.
Thanks.
Stop cowardice, ban guns!
N = aM +b, where N = number of eggs, M = mass of a small quantity of eggs
T = cS^f, where T = total mass of eggs, S = size of crab
so substituting produces the model estimating number of eggs N from size (S): N = a(cS^f)+b
what I'd like to be able to show are confidence envelope around the model predictions
thanks
Last edited by George Kraemer; 09-22-2017 at 11:12 AM.
Do you have the data which you use to estimate a, b, c and f?
yes. So the estimates have error terms associated.
You have problems because the model isn't linear and can't be made so. Things are also complicated because a and b (and c and f) are correlated.
This should (possibly could?) work -
Re-sample the first set of data, do the regression and get an a,b pair.
Re-sample the second set of data (log-logged), and do the regression to get a c,f pair.
For a particular size S, use a,b,c, and f to calculate N.
Repeat the three steps a few 1000 times to get a distribution for N. Find the 2.5% and 97.5%tiles.
thanks; that sounds do-able.
Are you looking for a confidence interval or are you actually interested in a prediction interval?
I don't have emotions and sometimes that makes me very sad.
one more question; what's the rule - assuming there is one - on the resample n (i.e., how many observations from the full data set used to estimate the constants each time?)?. The power curve data set has 258 observations. The linear data set has 102 observations
not sure; a measure of confidence around the predictions from the model
sorry, but still unsure. E.g., for the 102 mass-count observations, how many should be resampled each time for the estimates of the constants?
Make a new list of 102 pairs, choosing each pair at random from your original 102 pairs. Get a and b for that re-sampled list. This will give you a plausible a and b, correlated appropriately.
Do the same with the 258 pairs for the other set (after log-logging) to get a plausible c, f pair.
Find N.
Repeat.
Tweet |