Hi,Sir or Miss:

We meet a problem of plotting 3d, which is a part of 5D. In other word, we just fixed the rest of 2 variables and slice 5d into 3d.

Consider a function like Y=f(x1, x2, x3, x4). We want to  have a 3D surface plot in R for the fitted value Yhat (which is of course a function of x1, x2, x3 and x4) against x1 and x2 say, keeping x3 at its median level and fixing x4 as =1 (note that x4 is binary which can take values of 1 or 0 only). So we plot yhat, x1 and x2 in 3D surface after estimating the whole model (based on all 4 covariates) . 

Awaiting your reply. 
Thanks for your time,
Best
Kun

	[[alternative HTML version deleted]]

