tscor <-
function(x,y,xout = FALSE, outfun = out, varfun = winvar,
WARN = TRUE, HD = FALSE, ...){
#
# Correlation coefficient (explanatory measure of association)
# based on the Theil--Sen estimator
#
# To get a p.value, use the R function corb
#
temp=tsreg(x,y,varfun=varfun,xout=xout,outfun=outfun,HD=HD)
val=sign(temp$coef[2])*temp$Strength.Assoc
list(cor=val)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.