Determine confidence band csaps
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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?
0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!