[R] Exponential regression (Y = exp(a*X)) and standard error of Ŷi
alemu gonsamo
ggalex2002 at yahoo.com
Mon Oct 27 16:05:19 CET 2008
r-help at lists.R-project.org
Hello
First I want to implement exponential regression in R, with out constant for the following formula.
Y = exp(a*X)
‘a’ is coefficient I wanted to determine. That I could do also in SPSS but my question is rather to estimate the ‘standard error of Ŷi at each Xi. This is called in SPSS ‘satndard error of mean prediction’ or generally known for non-linear regression as ‘asymptotic standard error’. This is different from residual.
Below is the example data set for which I wanted to calculate the coefficient ‘a’ for the exponential regression in the form stated above and ‘standard error of Ŷi’. For this specific data, ‘a’ is computed using SPSS and the result is 0.5620. So, Y = exp(0.5620*X).
X Y SE of Ŷi
2 2.927064 ?
5 14.6582 ?
4 8.567706 ?
3 5.007817 ?
1 1.710867 ?
6 25.07823 ?
4 8.567706 ?
7 42.9055 ?
2 2.927064 ?
8 125.5872 ?
8 125.5872 ?
7 42.9055 ?
My questions are (1), how I implement exponential regression in R and (2) how to calculate the ‘standard error of Ŷi’’ for each Xi.
Well,
> exp1 <- nls(Y~exp(X*a), start=list(a=0.3), trace=T)
from this I can get summary statistics, 'a' is different from what i obtained using SPSS. Can someone help please atleast with getting SE of Ŷi.
I wrote very long to make the question clear.
thanks in advance
ggalex
Helsinki, Finland
ggalex2002 at yahoo.com
More information about the R-help
mailing list