search for: noisesd

Displaying 1 result from an estimated 1 matches for "noisesd".

Did you mean: noises
2007 Jul 17
1
fit a nonlinear model using nlm()
...ver's crit may differ from the "correct" one.) In the code below, please help me get the f() and nlm() bits right. I want to estimate signal and crit given stim and resp. Thanks very much for any help! Bill x<-1:100 con<-.1 signal<-con*cos(2*pi*3*x/length(x)) crit<-.5 noisesd<-.1 # each row is a new stim (trial). 500 trials resp<-array(dim=500) stim<-matrix(nrow=500,ncol=100) for (i in 1:500) { stim[i,]<-signal+rnorm(n=length(signal), mean=0, sd=noisesd) if (sum(stim[i,]*signal)>crit) (resp[i]<-1) else (resp[i]<-0) } f<-function(signalest) { r...