Reputation: 133
I run multiple regression with 6 variables. My equation looks like:
sl~I(p^2)+p+I(-fi^2)+fi+log(t)+t
I would like to plot just a part responsible for "t" variable, but I have no idea how can I do that. Here are my coefficients:
Coefficients:
(Intercept) p I(-fi^2) log(t) t I(p^2) fi
575.9793 -14.4657 144.7662 -139.1052 0.4559 0.8622 299.7550
I know that I can create a function:
f=-139.1052*log(t)+0.4559*t+A
Where A is a number and I can manipulate with "A" to fit the data(plot(t,sl)), but it is not efficient and proffesional.
How can I plot a curve just using variables dependant from "t" while fitting my data?
I just want to use these variables:
log(t) and t
Upvotes: 0
Views: 87
Reputation: 263352
You probably need to add back 'A' so that it equals the intercept plus the coefficients times the mean values for data referring to the other parameters in the model:
A.est <- 575.9793 -14.4657*mean(p) +144.7662*mean(-fi^2) +0.8622*mean(p^2) + 575.9793*mean(fi)
Then your estimated sl
values will appear to be appropriate on the scale of your data.
Upvotes: 1