> AML <- read.table('C:\\Aqing\\Collaboration\\Martincic_Danko\\AML.txt', header = TRUE)
> names(AML)
> dim(AML)
> AML[1:10,]
> AML$TGIF_RT_PCR[AML$TGIF_RT_PCR==50] <- NA
> AML$tgif_hybridization[AML$tgif_hybridization==50] <- NA
> plot(TGIF_RT_PCR ~ tgif_hybridization, data=AML)
> areg.boot(TGIF_RT_PCR ~ tgif_hybridization, data=AML, B=20)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
avas Additive Regression Model
areg.boot(x = TGIF_RT_PCR ~ tgif_hybridization, data = AML, B = 20)
Frequencies of Missing Values Due to Each Variable
TGIF_RT_PCR tgif_hybridization
4 1
n= 55 p= 1
Apparent R2 on transformed Y scale: 0.301
Bootstrap validated R2 : -0.028
Coefficients of standardized transformations:
Intercept tgif_hybridization
1.104798e-07 1.007944e+00
Residuals on transformed scale:
Min 1Q Median 3Q Max Mean S.D.
-1.902429e+00 -5.399164e-01 -1.646699e-01 5.652760e-01 2.104872e+00 -1.677951e-17 8.435034e-01
> areg.boot(TGIF_RT_PCR ~ tgif_hybridization, data=AML, method="ace",B=20)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
ace Additive Regression Model
areg.boot(x = TGIF_RT_PCR ~ tgif_hybridization, data = AML, B = 20,
method = "ace")
Frequencies of Missing Values Due to Each Variable
TGIF_RT_PCR tgif_hybridization
4 1
n= 55 p= 1
Apparent R2 on transformed Y scale: 0.411
Bootstrap validated R2 : -0.513
Coefficients of standardized transformations:
Intercept tgif_hybridization
1.775225e-17 9.948417e-01
Residuals on transformed scale:
Min 1Q Median 3Q Max Mean S.D.
-1.585702e+00 -4.971269e-01 -1.039891e-02 5.413493e-01 1.731166e+00 -1.097607e-17 7.747645e-01
'areg.boot' uses 'avas' or 'ace' to fit additive regression models allowing all variables in the model (including the
right-hand-side) to be transformed, with transformations chosen so as to optimize certain criteria. For 'method="avas"'
the response transformation is restricted to be monotonic.
> cor.test(AML$TGIF_RT_PCR, AML$tgif_hybridization, method="spearman")
Spearman's rank correlation rho
data: AML$TGIF_RT_PCR and AML$tgif_hybridization
S = 37712, p-value = 0.007157
alternative hypothesis: true rho is not equal to 0
sample estimates:
rho
-0.3604691
Warning message:
p-values may be incorrect due to ties in: cor.test.default(AML$TGIF_RT_PCR, AML$tgif_hybridization, method = "spearman")
> spearman2(AML$TGIF_RT_PCR, AML$tgif_hybridization)
rho2 F df1 df2 P n Adjusted rho2
0.12993798 7.91519755 1.00000000 53.00000000 0.00686233 55.00000000 0.11352171
'spearman2' computes the square of Spearman's rho rank correlation and a generalization of it in which 'x' can relate
non-monotonically to 'y'. This is done by computing the Spearman multiple rho-squared between '(rank(x), rank(x)^2)'
and 'y'. When 'x' is categorical, a different kind of Spearman correlation used in the Kruskal-Wallis test is computed
(and 'spearman2' can do the Kruskal-Wallis test). This is done by computing the ordinary multiple 'R^2' between 'k-1'
dummy variables and 'rank(y)', where 'x' has 'k' categories. 'x' can also be a formula, in which case each predictor
is correlated separately with 'y', using non-missing observations for that predictor. 'print' and 'plot' methods allow
one to easily print or plot the results of 'spearman2(formula)'. The adjusted 'rho^2' is also computed, using the same
formula used for the ordinary adjusted 'R^2'. The 'F' test uses the unadjusted R2. For 'plot', a dot chart is drawn
which by default shows, in sorted order, the adjusted 'rho^2'.