{"id":611,"date":"2024-08-29T04:21:13","date_gmt":"2024-08-29T04:21:13","guid":{"rendered":"https:\/\/agustincastro.es\/?p=611"},"modified":"2026-02-05T13:49:18","modified_gmt":"2026-02-05T13:49:18","slug":"application-of-pca-in-biomedical-data-with-r-breast-tumor-biopsies","status":"publish","type":"post","link":"https:\/\/agustincastro.es\/index.php\/2024\/08\/29\/application-of-pca-in-biomedical-data-with-r-breast-tumor-biopsies\/","title":{"rendered":"\ud83d\udd0dApplication of <pca> &lt;PCA> in Biomedical Data with R &#8211; Breast Tumor Biopsies\ud83d\udcca<\/pca>"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">[<em>english version<\/em>]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This exercise is designed to demonstrate <strong>how PCA can simplify and clarify complex data<\/strong>, facilitating the analysis and interpretation of results.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>You can review the analysis development and conclusions here<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/rpubs.com\/acastro\/breast_tumor_en_PCA\">https:\/\/rpubs.com\/acastro\/breast_tumor_en_PCA<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img decoding=\"async\" height=\"16\" width=\"16\" alt=\"\ud83d\udccc\" data-src=\"https:\/\/static.xx.fbcdn.net\/images\/emoji.php\/v9\/tac\/1\/16\/1f4cc.png\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 16px; --smush-placeholder-aspect-ratio: 16\/16;\"> In this case, I use the \u00abbiopsy\u00bb dataset from the MASS package, one of the most popular and widely used in statistical analysis. It was developed by Venables and Ripley and accompanies the book \u00abModern Applied Statistics with S.\u00bb<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><img decoding=\"async\" height=\"16\" width=\"16\" alt=\"\ud83d\udccc\" data-src=\"https:\/\/static.xx.fbcdn.net\/images\/emoji.php\/v9\/tac\/1\/16\/1f4cc.png\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 16px; --smush-placeholder-aspect-ratio: 16\/16;\"> The \u00abbiopsy\u00bb dataset contains information for classifying breast tumors as &lt;benign&gt; or &lt;malignant&gt; based on features obtained from fine needle aspiration biopsy images of breast masses. The data include both quantitative cellular features and the final tumor classification. It is a small and manageable dataset that provides a range of features for applying multiple modeling techniques and is ideal for teaching and experimenting with data analysis and machine learning. Additionally, it is well-documented and supported in the R MASS package.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"755\" height=\"536\" data-src=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-16.png\" alt=\"\" class=\"wp-image-607 lazyload\" data-srcset=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-16.png 755w, https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-16-300x213.png 300w\" data-sizes=\"(max-width: 755px) 100vw, 755px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 755px; --smush-placeholder-aspect-ratio: 755\/536;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"586\" height=\"531\" data-src=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-17.png\" alt=\"\" class=\"wp-image-608 lazyload\" data-srcset=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-17.png 586w, https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-17-300x272.png 300w\" data-sizes=\"(max-width: 586px) 100vw, 586px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 586px; --smush-placeholder-aspect-ratio: 586\/531;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"746\" height=\"539\" data-src=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-15.png\" alt=\"\" class=\"wp-image-606 lazyload\" data-srcset=\"https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-15.png 746w, https:\/\/agustincastro.es\/wp-content\/uploads\/2024\/08\/image-15-300x217.png 300w\" data-sizes=\"(max-width: 746px) 100vw, 746px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 746px; --smush-placeholder-aspect-ratio: 746\/539;\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><img decoding=\"async\" height=\"16\" width=\"16\" data-src=\"https:\/\/static.xx.fbcdn.net\/images\/emoji.php\/v9\/te4\/1\/16\/270f.png\" alt=\"\u270f\ufe0f\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" style=\"--smush-placeholder-width: 16px; --smush-placeholder-aspect-ratio: 16\/16;\"> <strong>PCA simplifies analysis and improves visualization and interpretation of results<\/strong> by transforming the original variables into a new set of principal components or factors. These components retain the maximum amount of information while using fewer dimensions. Thus, the first principal component explains most of the variance in the data, while each subsequent component captures the remaining variance without overlapping with the information already explained by the previous components. PCA is particularly valuable for large datasets, as it enables significant simplification of analysis and effective visualization without sacrificing relevant information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This exercise not only demonstrates the power of PCA in biomedical data analysis but also serves as a resource for those learning multivariate analysis techniques in R. I hope you find it interesting, if applicable.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[english version] This exercise is designed to demonstrate how PCA can simplify and clarify complex data, facilitating the analysis and interpretation of results. You can review the analysis development and conclusions here: https:\/\/rpubs.com\/acastro\/breast_tumor_en_PCA In this case, I use the \u00abbiopsy\u00bb dataset from the MASS package, one of the most popular and widely used in statistical [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":609,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,7,5],"tags":[],"class_list":["post-611","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-portfolio","category-r","category-tecnica-y-practica"],"_links":{"self":[{"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/posts\/611","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/comments?post=611"}],"version-history":[{"count":3,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/posts\/611\/revisions"}],"predecessor-version":[{"id":615,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/posts\/611\/revisions\/615"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/media\/609"}],"wp:attachment":[{"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/media?parent=611"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/categories?post=611"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agustincastro.es\/index.php\/wp-json\/wp\/v2\/tags?post=611"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}