I have a regression that looks like this:
fit <- nls (data$y ~ (data$v1 + data$v2 + data$v3 + data$v4) *(1 + exp(theta1 - theta2*data$v5 - theta3*data$v6)^-1),
data = data,
start = c (theta1 =0, theta2= 0, theta3= 0))
summary(fit)
In the first part the variables follow a linear relationship but they are weighted by a non-linear expression (second part). The model runs, but the summary only shows the information for the parameters on the non-linear part (theta1, theta2, and theta3). Does anybody know how to get the information about the intercept and the coefficient of the non-linear part? Or my formulation wrong and R is not estimating these coefficients?
data$
part in front of every variable. – Roman Luštriklm()
,nls()
does not assume that you want to estimate a coefficient for each variable in your model. So you'd want it to look likealpha1*v1 + alpha2*v2 + alpha3*v3 + alpha4*v4
or something like that. It also would have been nice to make this a reproducible example by including sample data so it's clear what is contained indata
and what is not. – MrFlick