Borrar filtros
Borrar filtros

Determine confidence band csaps

1 visualización (últimos 30 días)
jakob ekwall
jakob ekwall el 4 de Feb. de 2016
Editada: jakob ekwall el 4 de Feb. de 2016
Hi!
I've found an answer to problem which is similar to mine on crossvalidated (Link http://goo.gl/NSGLs5). However the solution to the problem is written for R and I'm trying to translate it to Matlab but I've run in to some trouble.
What I've done is to fit a curve to my data using csaps and now I'm trying to determine the confidence band for this fit. The following code is the thing I'm trying to replicate in Matlab. However I'm not sure how to get a hold of the leverage values (lev) which is provided when one fits the curve using R.
res <- (sp$yin - sp$y)/(1-sp$lev) # Get jacknife residual at each data point
sigma <- sqrt(var(res)) # Calculate stddev of jackknife residuals
upper <- sp$y + 5.0*sigma*sqrt(sp$lev) # Create confidence bands
lower <- sp$y - 5.0*sigma*sqrt(sp$lev)
csaps in Matlab and the smooth.spline function in R doesn't seem to work in exactly the same way. Is there another way to replicate the code above in Matlab?
(Link to documentation on R smoothing function http://goo.gl/JiyQS2) Thanks!

Respuestas (0)

Categorías

Más información sobre Statistics and Machine Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by