est.sig.hat | R Documentation |
Estimates mean and standard deviation of noise part of signal
est.sig.hats(data,peak_postion,buffer_pc)
x |
Data on which to estimate from, should be averaged first |
peak_position |
Position of center of peak, if known, default is the index of max(data) |
buffer_pc |
Percentage of data on each side of peak_postion to exclude from calcualtions. Default is 0.3 which is very conservative as excludes 60pcof data total. |
1 |
Sample SD estimate of noise |
2 |
Sample mean estimate of noise |
Rose Connolly connolr3@tcd.ie
#mysignal<-noise(200,10,250)+peak(200,10,250,7,115) #mysignal<-signal.averaging(mysignal,200,10) #est.sig.hat(mysignal,115,0.15) ## The function is currently defined as est.sig.hat<-function(data, peak_position=which.max(abs(data)),buffer_pc=0.3){ lo<-peak_position-(buffer_pc*length(data)) hi<-peak_position+(buffer_pc*length(data)) buffer_range<-lo:hi reg_data<- data[-buffer_range] sig_hat<-sqrt(var(reg_data)) normhat<-mean(reg_data) return(c(sig_hat,normhat)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.