This document discusses visualizing linear regression models using ggplot2. It begins by outlining some issues with the current plot.lm() function, such as combining the data and visual representation. The document then proposes separating the data from the representation and generating customized plots rather than relying on a canned set of default plots. It concludes by showing an example residual vs fitted plot generated from a linear model.
The Mobile Web is a complicated beast, making Mobile Web Performance a tough problem to tackle. Is an iPad on WiFi a part of the Mobile Web? How about a laptop with a 3G stick?
This presentation tries to split the Mobile Web into three categories, to make it more manageable: Network, Software & Hardware. For each, it reviews the performance challenges this category entails, and offers possible solutions to those challenges.
A recording of this presentation (with audio) is available here: http://vimeo.com/32917131
The Mobile Web is a complicated beast, making Mobile Web Performance a tough problem to tackle. Is an iPad on WiFi a part of the Mobile Web? How about a laptop with a 3G stick?
This presentation tries to split the Mobile Web into three categories, to make it more manageable: Network, Software & Hardware. For each, it reviews the performance challenges this category entails, and offers possible solutions to those challenges.
A recording of this presentation (with audio) is available here: http://vimeo.com/32917131
Correlations, Trends, and Outliers in ggplot2Chris Rucker
This project explains how ggplot2 can serve as an adequate instrument to visualize data; how in a fantastic world, a graph may construct its own identity outside of the rigid roles imposed upon itself by raw data.
Overview of how/why to reshape data in R from "wide" (spreadsheet-like) to "long" (database-like) and back.
Focuses on Hadley Wickham's reshape2 package and uses state population data from the 2010 U.S. Census. Also demonstrates use of dcast() to replace table(), etc. to generate crosstabs from a sample market research consumer survey.
Presented at the April 2011 meeting of the Greater Boston useR Group.
This set of slides is based on the presentation I gave at ACM DataScience camp 2014. This is suitable for those who are still new to R. It has a few basic data manipulation techniques, and then goes into the basics of using of the dplyr package (Hadley Wickham) #rstats #dplyr
Overview of a few ways to group and summarize data in R using sample airfare data from DOT/BTS's O&D Survey.
Starts with naive approach with subset() & loops, shows base R's tapply() & aggregate(), highlights doBy and plyr packages.
Presented at the March 2011 meeting of the Greater Boston useR Group.
Correlations, Trends, and Outliers in ggplot2Chris Rucker
This project explains how ggplot2 can serve as an adequate instrument to visualize data; how in a fantastic world, a graph may construct its own identity outside of the rigid roles imposed upon itself by raw data.
Overview of how/why to reshape data in R from "wide" (spreadsheet-like) to "long" (database-like) and back.
Focuses on Hadley Wickham's reshape2 package and uses state population data from the 2010 U.S. Census. Also demonstrates use of dcast() to replace table(), etc. to generate crosstabs from a sample market research consumer survey.
Presented at the April 2011 meeting of the Greater Boston useR Group.
This set of slides is based on the presentation I gave at ACM DataScience camp 2014. This is suitable for those who are still new to R. It has a few basic data manipulation techniques, and then goes into the basics of using of the dplyr package (Hadley Wickham) #rstats #dplyr
Overview of a few ways to group and summarize data in R using sample airfare data from DOT/BTS's O&D Survey.
Starts with naive approach with subset() & loops, shows base R's tapply() & aggregate(), highlights doBy and plyr packages.
Presented at the March 2011 meeting of the Greater Boston useR Group.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...NelTorrente
In this research, it concludes that while the readiness of teachers in Caloocan City to implement the MATATAG Curriculum is generally positive, targeted efforts in professional development, resource distribution, support networks, and comprehensive preparation can address the existing gaps and ensure successful curriculum implementation.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
Delivering Micro-Credentials in Technical and Vocational Education and TrainingAG2 Design
Explore how micro-credentials are transforming Technical and Vocational Education and Training (TVET) with this comprehensive slide deck. Discover what micro-credentials are, their importance in TVET, the advantages they offer, and the insights from industry experts. Additionally, learn about the top software applications available for creating and managing micro-credentials. This presentation also includes valuable resources and a discussion on the future of these specialised certifications.
For more detailed information on delivering micro-credentials in TVET, visit this https://tvettrainer.com/delivering-micro-credentials-in-tvet/
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Model Visualisation (with ggplot2)
1. Model
visualisation
(with ggplot2)
Hadley Wickham
Rice University
Friday, 31 July 2009
2. 1. Introducing plot.lm
2. The current state of play. Why this is
suboptimal.
3. A better strategy: separate data from
representation.
4. Why a canned set of plots is not
good enough.
Friday, 31 July 2009
4. # File src/library/stats/R/plot.lm.R show[which] <- TRUE
# Part of the R package, http://www.R-project.org r <- residuals(x)
# yh <- predict(x) # != fitted() for glm
# This program is free software; you can redistribute it and/or modify w <- weights(x)
# it under the terms of the GNU General Public License as published by if(!is.null(w)) { # drop obs with zero wt: PR#6640
# the Free Software Foundation; either version 2 of the License, or wind <- w != 0
# (at your option) any later version. r <- r[wind]
# yh <- yh[wind]
# This program is distributed in the hope that it will be useful, w <- w[wind]
# but WITHOUT ANY WARRANTY; without even the implied warranty of labels.id <- labels.id[wind]
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the }
# GNU General Public License for more details. n <- length(r)
# if (any(show[2L:6L])) {
# A copy of the GNU General Public License is available at s <- if (inherits(x, "rlm")) x$s
# http://www.r-project.org/Licenses/ else if(isGlm) sqrt(summary(x)$dispersion)
else sqrt(deviance(x)/df.residual(x))
plot.lm <- hii <- lm.influence(x, do.coef = FALSE)$hat
function (x, which = c(1L:3,5), ## was which = 1L:4, if (any(show[4L:6L])) {
caption = list("Residuals vs Fitted", "Normal Q-Q", cook <- if (isGlm) cooks.distance(x)
"Scale-Location", "Cook's distance", else cooks.distance(x, sd = s, res = r)
"Residuals vs Leverage", }
expression("Cook's dist vs Leverage " * h[ii] / (1 - h[ii]))), }
panel = if(add.smooth) panel.smooth else points, if (any(show[2L:3L])) {
sub.caption = NULL, main = "", ylab23 <- if(isGlm) "Std. deviance resid." else "Standardized residuals"
ask = prod(par("mfcol")) < length(which) && dev.interactive(), ..., r.w <- if (is.null(w)) r else sqrt(w) * r
id.n = 3, labels.id = names(residuals(x)), cex.id = 0.75, ## NB: rs is already NaN if r=0, hii=1
qqline = TRUE, cook.levels = c(0.5, 1.0), rs <- dropInf( r.w/(s * sqrt(1 - hii)), hii )
add.smooth = getOption("add.smooth"), }
label.pos = c(4,2), cex.caption = 1)
{ if (any(show[5L:6L])) { # using 'leverages'
dropInf <- function(x, h) { r.hat <- range(hii, na.rm = TRUE) # though should never have NA
if(any(isInf <- h >= 1.0)) { isConst.hat <- all(r.hat == 0) ||
warning("Not plotting observations with leverage one:n ", diff(r.hat) < 1e-10 * mean(hii, na.rm = TRUE)
paste(which(isInf), collapse=", "), }
call.=FALSE) if (any(show[c(1L, 3L)]))
x[isInf] <- NaN l.fit <- if (isGlm) "Predicted values" else "Fitted values"
} if (is.null(id.n))
x id.n <- 0
} else {
id.n <- as.integer(id.n)
if (!inherits(x, "lm")) if(id.n < 0L || id.n > n)
stop("use only with "lm" objects") stop(gettextf("'id.n' must be in {1,..,%d}", n), domain = NA)
if(!is.numeric(which) || any(which < 1) || any(which > 6)) }
stop("'which' must be in 1L:6") if(id.n > 0L) { ## label the largest residuals
isGlm <- inherits(x, "glm") if(is.null(labels.id))
show <- rep(FALSE, 6) labels.id <- paste(1L:n)
Friday, 31 July 2009
8. Problems
Hard to understand.
Hard to extend.
Locked into set of pre-specified graphics.
Of no use to other graphics packages.
Friday, 31 July 2009
9. Alternative approach
What does this actually code do?
It 1) extracts various quantities of interest
from the model and then 2) plots them
So why not perform those two tasks
separately?
Friday, 31 July 2009
10. Quantities of interest
fortify.lm <- function(model, data = model$model, ...) {
infl <- influence(model, do.coef = FALSE)
data$.hat <- infl$hat
data$.sigma <- infl$sigma
data$.cooksd <- cooks.distance(model, infl)
data$.fitted <- predict(model)
data$.resid <- resid(model)
data$.stdresid <- rstandard(model, infl)
data
}
Note use of . prefix to
avoid name clasehes
Friday, 31 July 2009
22. Other models
A work in progress: hard work because
most of the functions are like plot.lm
Models: lm, tsdiag, survreg
Maps: maps, and sp classes. Much
easier to work with data frames.
Friday, 31 July 2009
23. Conclusions
Separating data from visualisation
improves clarity and reusability.
A pre-specified set of plots will not
uncover many model problems. Should
be easy custom diagnostics for your
needs.
Friday, 31 July 2009
24. crantastic! http://crantastic.org
A community site for finding,
rating, and reviewing R packages.
Friday, 31 July 2009