Dear all,
I have a data-set of 91 variables.
It is related with a qualitative analysis I made to analyse a few
phenomena. For this reason the questions are grouped in 10 clusters, since
they express different phenomena of the analysis. I made the subset to
collect the questions and represent the phenomena:
*example1<- subset(data, select=c("a1", "a2",
"a14", "a21"))*
then I did the dependence matrix to check the dependence among the single
variables in each cluster:
*p1 <- stat1 <- diag(ncol(example1))*
*
*
*colnames(p1) <- rownames(p1) <- colnames(example1)*
*
*
*colnames(stat1) <- rownames(stat1) <- colnames(example1)*
*rn <- rownames(p1) *
*cn <- colnames(p1)*
*
*
*#loop for the p-values*
*for(i in 1:ncol(example1)){*
*for(j in 1:ncol(example1)){*
*a <- example1[, rn[i]]*
*b <- example1[, cn[j]]*
*r <- chisq.test(a,b)$p.value*
*p1[i, j] <- r }}*
*
*
*#loop for the statistic *
*for(i in 1:ncol(example1)){*
*for(j in 1:ncol(example1)){ *
*a <- example1[, rn[i]]*
*b <- example1[, cn[j]]*
*r <- chisq.test(a,b)$statistic*
*stat1[i, j] <- r }}* #placing the p-values in the upper diagonal of stat
*stat1[upper.tri(stat1)] <- p1[upper.tri(p1)] *
*diag(stat1) <- 1 *
*stat1* #this is for the first subset
But now I have two questions:
1. How can I make the dependence hypothesis test among the variables and
set my alpha?
2. How can I make the regression analysis?
Please I don't know how to continue. I would appreciate any kind of help.
Thank you
[[alternative HTML version deleted]]