필터 지우기
필터 지우기

Determine confidence band csaps

조회 수: 1 (최근 30일)
jakob ekwall
jakob ekwall 2016년 2월 4일
편집: jakob ekwall 2016년 2월 4일
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!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Statistics and Machine Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by