Noi/NOTES/2012-6-14
Jump to navigation
Jump to search
Regression analysis of UCLA SZ data (disease status)[edit]
- Continued from: http://genome-tech.ucsd.edu/LabNotes/index.php/Noi/NOTES/2012-6-13
- From the comment on previous page
- LDA: random choose samples for training and (have UCLA-SZ and UCSD-GA on training and testing data sets)
- Training and testing data set (I used the same group of training and testing data as assigned for age analysis)
- list 1-96 =>UCSD-SZ, 97-169 => UCSD-GA
- trainAge <- c(1:40, 91:132)
- testAge <- c(41:90, 133:169)
- From the previous analysis, I used PC1-PC3 scores as input for LDA analysis. However when I plot scree plot of the variances contributed on each PC, the change in slope in the scree plot occurs at component 4. In this analysis, I'll put PC1-PC4 scores as input.
A=read.table("UCLA_regression_status_pval0.015_MM",header=TRUE,row.names=1) B=na.omit(A) B$STDEV=NULL B$min_RD=NULL B$mean_RD=NULL pca1 <- prcomp(t(B), scale=TRUE) screeplot(pca1, type="line") File:Screeplot status pval0.015.png
Script: lda_status_PC1-4_v2.R
File:Plot LD1 status PC1-4 p.015 v2 training.png File:Plot LD1 status PC1-4 p.015 v2 test.png
Table of raw data
Status (p-value 0.015) | Predicted\Truth | Affected | Unaffected | Correct | FALSE | Total |
Training | Affected | 10 | 0 | 82 | 0 | 82 |
Unaffected | 0 | 72 | ||||
Testing | Affected | 10 | 2 | 83 | 4 | 87 |
Unaffected | 2 | 73 | ||||
Cross validation | Affected | 19 | 2 | 164 | 5 | 169 |
Unaffected | 3 | 145 |
Table of accuracy and misclassification rate
Training (Accuracy of allocation) | Misclassicication rate | Testing (quality of model) | Misclassicication rate | Cross validation | Misclassicication rate |
82 of 82 | 0.00% | 83 of 87 | 4.60% | 164 of 169 | 2.96% |
Compare the result to previous analysis by treating UCLA-SZ as training data and UCSD-GA as testing data
Training (Accuracy of allocation) | Misclassicication rate | Testing (quality of model) | Misclassicication rate | Cross validation | Misclassicication rate |
92 of 96 | 4.17% | 73 of 73 | 0.00% | 164 of 169 | 2.96% |
Summary