R/cov.f.R

cov.f <-
function(x,y)
{
	## computes the covariance between vectors x and y
	## using the Fortran interface
	n<-length(x)
	c<-0
	if (n!=length(y))
		print("Length Error")
	else
		c<-.Fortran("rs_cov",c=as.double(0),
		            as.double(x),as.double(y),mean.f(x),mean.f(y),
		            as.integer(n),PACKAGE="stima")$c
	return(c)
}

Try the stima package in your browser

Any scripts or data that you put into this service are public.

stima documentation built on June 3, 2019, 5:04 p.m.