# NOT RUN {
Q1 <- rnorm(1000); Q2 <- Q1+rnorm(1000)
PLpar(Q1,Q2); PLpar(Q1,Q2, byrho=TRUE) # two estimates for same data
PLpar(rho= 0.76) # positive association
PLpar(rho=-0.76) # negative association
tauCOP(cop=PLcop, para=PLpar(rho=-0.15, by.rho=TRUE))
# }
# NOT RUN {
RHOS <- seq(0,0.990, by=0.002); TAUS <- rep(NA, length(RHOS))
for(i in 1:length(RHOS)) {
#message("Spearman Rho: ", RHOS[i])
theta <- PLACKETTpar(rho=RHOS[i], by.rho=TRUE); tau <- NA
try(tau <- tauCOP(cop=PLACKETTcop, para=theta), silent=TRUE)
TAUS[i] <- ifelse(is.null(tau), NA, tau)
}
LM <- lm(TAUS~ RHOS + I(RHOS^2) + I(RHOS^3) + I(RHOS^4) +
I(RHOS^5) + I(RHOS^6) + I(RHOS^7) + I(RHOS^8) - 1)
plot(RHOS,TAUS, type="l", xlab="abs(Spearman Rho)", ylab="abs(Kendall Tau)")
lines(RHOS,fitted.values(LM), col=3)#
# }
Run the code above in your browser using DataLab