Skip to content
Prev 275390 / 398506 Next

Using predicted() in R

On Oct 24, 2011, at 2:45 PM, flokke wrote:

            
Many times the x1,x2,and x3 will be irregularly spaced.
You might want to create predictions on a regular grid for plotting  
functions htat require such. Obviously you would want to keep the  
values within the ranges of original values so you don't extrapolate  
beyond the range of measurements.
And you might be plotting the estimated and 95% ranges.
Perhaps:

x1=seq(range(x1)[1]:range(x1)[2], by=diff(range(x1))/10

... und so weiter.
That looks wrong. `fitted` should be one per record. You have not  
followed the advice to post real data so it is not possible to  
diagnose your error. Please read the Posting Guide.
David Winsemius, MD
West Hartford, CT