Let
F show 10 fitted values, say F = runif(10,1,2)
L show the lower limit of these 10 fitted values,say L = runif(10,0,1)
U show the upper limit of these 10 fitted values, say U = runif(10,2,3)
How can I show these 10 fitted values and their confidence intervals in the same plot like the one below in R?
Thanks
Here is a plotrix solution:
And here is a ggplot solution:
UPDATE: Here is a base solution to your edits:
Here is part of my program related to plotting confidence interval.
1. Generate the test data
Result
2. Fitting the raw data using B-spline smoother method
Result
Here is a solution using functions
plot()
,polygon()
andlines()
.Now use example data provided by OP in another question:
Assemble into a data frame (no x provided, so using indices)