Displaying 2 results from an estimated 2 matches for "intctk".
Did you mean:
intctl
2006 May 17
0
script S-plus -> R
Dear List,
I'm trying to transfer a script that uses S-plus functions for the
kernel and integration calculations to R. This it what it looks like in
S-plus:
qrm(cpt,don,ect,h,intctk,nbcol,nbl1,nbl2,nbl3,nlc,nlgn,overlap,Results,tdon,tdon1,tdon11,tdon2,tdon21)
don<-guiDisplayFileDialog()
import.data (DataFrame="tdon",FileName=don,FileType="EXCEL")
nbcol<-length(tdon[1,])
nlc<-matrix(0,1,nbcol)
for (i in 1:nbcol)
{nbl1<-tdon[,i]
nbl2<-nbl1[nbl...
2006 Jul 11
0
script problem to obtain pairs of overlap values
...i], kernel="gaussian")$y}
for (j in (i+1):nbcol)
{tdon2<-tdon[,j]
tdon21<- subset(tdon2,tdon2!="NA")
fctk2<-function(x)
{density (tdon21, bw=h[j], kernel="gaussian")$y}
diffctk<-function(x)
{abs(fctk1(x)-fctk2(x))}
intctk<- approxfun (diffctk(x), rule=2)
int<- integrate(diffctk,-Inf,Inf)$value
overlap<- 1 - 0.5* int
}
}
The use of "approxfun" to integrate the difference in the estimated
density values (my "diffctk" function) was s...