1

I'm working on a school assignment, where I am supposed to preform a non linear regression on y= 1-(1/(1+beta*X))+U, we generate Y with a given beta value, and then treat X and Y as our observations and try to find the estimate of beta.

I've been trying to use the nls fuction, but the result always come out being very close to whatever starting value I select, not to the beta. Heres the code that I'm using so far:

set.seed(1)
Ut = (c(rnorm(1000, mean=0, sd=(sqrt(1)))))
Xt = (c(rnorm(1000, mean=0, sd=(sqrt(1)))))
beta = 3
Yt = (1-(1/(1+beta*Xt))+Ut)
df <- data.frame (Xt, Yt)
m<- nls (Yt ~ I(1-(1/(1+(betaF*Xt)))+Ut), data= df, start = list(betaF= 1))
summary (m)

In this case the estimate for beta comes out as being close to 1, not close to 3 as it should. Where am I going wrong? The function is asymptotic, should i be using a different function such as NLSstAsymptotic?

0 Answers0