File: LIK.density.spattemp.single.R

package info (click to toggle)
r-cran-sparr 2.3-16-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 884 kB
  • sloc: makefile: 2
file content (10 lines) | stat: -rw-r--r-- 424 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
LIK.density.spattemp.single <- function(bands,pp,tt,tlim,xyin,xys,sedge,tedge,parallelise,verbose){
  if(any(bands<=0)) return(NA)
  if(verbose) cat("h =",bands[1],"\b; lambda =",bands[2],"\n")
  h <- bands[1]
  lam <- bands[2]
  
  temp.dens.pts <- spattemp.LOO(pp,tt,h,lam,tlim,xyin,xys,sedge,tedge,parallelise=parallelise)
  if(any(temp.dens.pts<=0)) return(log(min(temp.dens.pts)))
  return(-mean(log(temp.dens.pts)))
}