0% found this document useful (0 votes)
178 views91 pages

Quantitative Social Science Data With R: An Introduction 1st Edition Brian J Fogarty Digital Version 2025

Scholarly document: Quantitative Social Science Data with R: An Introduction 1st Edition Brian J Fogarty Instant availability. Combines theoretical knowledge and applied understanding in a well-organized educational format.

Uploaded by

qeqcpdlk685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views91 pages

Quantitative Social Science Data With R: An Introduction 1st Edition Brian J Fogarty Digital Version 2025

Scholarly document: Quantitative Social Science Data with R: An Introduction 1st Edition Brian J Fogarty Instant availability. Combines theoretical knowledge and applied understanding in a well-organized educational format.

Uploaded by

qeqcpdlk685
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Quantitative Social Science Data with R: An

Introduction 1st Edition Brian J Fogarty pdf


download
[Link]
brian-j-fogarty/

★★★★★ 4.9/5.0 (37 reviews) ✓ 196 downloads ■ TOP RATED


"Perfect download, no issues at all. Highly recommend!" - Mike D.

DOWNLOAD EBOOK
Quantitative Social Science Data with R: An Introduction 1st
Edition Brian J Fogarty pdf download

TEXTBOOK EBOOK EBOOK META

Available Formats

■ PDF eBook Study Guide TextBook

EXCLUSIVE 2025 EDUCATIONAL COLLECTION - LIMITED TIME

INSTANT DOWNLOAD VIEW LIBRARY


We believe these products will be a great fit for you. Click
the link to download now, or visit [Link]
to discover even more!

An Introduction to Management Science: Quantitative


Approach 15th Edition David R. Anderson

[Link]
science-quantitative-approach-15th-edition-david-r-anderson/

Quantitative Methods for the Social Sciences A


Practical Introduction with Examples in R 2nd Edition
Daniel Stockemer

[Link]
social-sciences-a-practical-introduction-with-examples-in-r-2nd-
edition-daniel-stockemer/

Introduction to Data Science for Social and Policy


Research Collecting and Organizing Data with R and
Python 1st Edition Jose Manuel Magallanes Reyes

[Link]
social-and-policy-research-collecting-and-organizing-data-with-r-
and-python-1st-edition-jose-manuel-magallanes-reyes/

Concurrency in Go First Edition Katherine Cox Buday

[Link]
katherine-cox-buday/
Emerging Adulthood and Higher Education A New Student
Development Paradigm 1st Edition Joseph L Murray Editor
Jeffrey Jensen Arnett Editor

[Link]
education-a-new-student-development-paradigm-1st-edition-joseph-
l-murray-editor-jeffrey-jensen-arnett-editor/

Software Development Patterns and Antipatterns 1st


Edition Jones

[Link]
antipatterns-1st-edition-jones/

The Mini Rough Guide to Malta 1st Edition Rough Guides

[Link]
edition-rough-guides/

Dreams Bigger Than Heartbreak Unstoppable 2 1st Edition


Charlie Jane Anders

[Link]
unstoppable-2-1st-edition-charlie-jane-anders/

The Routledge Companion to Organizational Diversity


Research Methods 1st Edition Sine Nørholm Just (Editor)

[Link]
organizational-diversity-research-methods-1st-edition-sine-
norholm-just-editor/
Java Complete book James Gary

[Link]
QUANTITATIVE
SOCIAL SCIENCE
DATA WITH
An Introduction

Brian J. Fogarty SAGE


@SAGE
Los Angeles | London | New Delhi
‘Singapore | Washington DC | Melbourne

SAGE Publications Ltd © Brian J. Fogarty 2019


1 Oliver's Yard
55 City Road First published 2019
London EC1Y 1SP

SAGE Publications Inc.


2455 Teller Road
Thousand Oaks, California 91320 Apart from any fair dealing for the purposes of research or private
study, or criticism or review, as permitted under the Copyright,
SAGE Publications India Pvt Ltd Designs and Patents Act, 1988, this publication may be reproduced,
B 1/1 1 Mohan Cooperative Industrial Area stored or transmitted in any form, or by any means, only with the prior
Mathura Road permission in writing of the publishers, or in the case of reprographic
New Delhi 110 044 reproduction, in accordance with the terms of licences issued by
the Copyright Licensing Agency. Enquiries concerning reproduction
SAGE Publications Asia-Pacific Pte Ltd outside those terms should be sent to the publishers.
3 Church Street
#10-04 Samsung Hub
Singapore 049483

Editor: Jai Seaman Library of Congress Control Number: 2018941250


Assistant editor: Charlotte Bush
Production editor: lan Antcliff British Library Cataloguing in Publication data
Copyeditor: Richard Leigh
Proofreader: Neville Hankins
Indexer: Martin Hargreaves
Marketing manager: Ben Griffin-Sherwood
Cover design: Shaun Mercier
A catalogue record for this book is available from
Typeset by: C&M Digitals (P) Ltd, Chennai, India
the British Library
Printed in the UK

ISBN 978-1-5264-1149-5
ISBN 978-1-5264-1150-1 (pbk)

At SAGE we take sustainability seriously, Most of our products are printed in the UK using responsibly sourced papers and
boards. When we print overseas we ensure sustainable papers are used as measured by the PREPS grading system.
We undertake an annual audit to monitor our sustainability.
CONTENTS
Preface
About the Author
Online Resources xi

1 Introduction

2 Introduction to R and RStudio

3 Finding Data

4 Data Management 35

5S Variables and Manipulation 55

6 Developing Hypotheses 75

7 Univariate and Descriptive Statistics 87

8 Visualising Data 113

9 Hypothesis Testing 149

10 Bivariate Analysis 16S

11 Linear Regression and Model Building 191

12 OLS Assumptions and Diagnostic Testing 217

13 Putting It All Together 249

Bibliography 306
Index 308
PREFACE

INTRODUCTION
There is little need for another statistics book. The equations for the standard error and linear
regression have not changed. The mathematics of introductory statistics can be found in hun-
dreds of other texts. What are needed are texts that take students and practitioners through step-
by-step procedures for hands-on analysis of social science data. Although the equations of basic
statistics do not change, the software researchers use does and new techniques are consistently
being developed.
Students in social science are continually faced with quantitative data that they must analyse.
One reason students typically choose to study social sciences at university is that they were
not good at mathematics in secondary school. If you were good at mathematics and wanted to
work with data, you probably would be studying statistics or a similar subject. Here’s the thing,
though: data analysis really does not require mathematics. It requires an interest in using quantita-
tive data to make sense of the world around you. It may be a different way of thinking about the
world, but it is not scary or foreign. I use myself as an example of learning quantitative social
science (QSS). I have taught undergraduate and graduate quantitative methods (QM) for over a
decade, have published QM articles, and now I am writing a QM book. However, as an under-
graduate I studied political science, history, and medieval studies. To be sure, studying Dante and
Cicero did not prepare me for writing R code and running regression models.
This leads me to a common question on the minds of QSS undergraduates: how is what I am
doing different from my friends studying statistics? In reality, it is not. The difference is that you
are working with social science data and not trying to compare samples of the widths of fruit fly
wings. And, particularly unlike econometrics, you are not getting bogged down with the math-
ematics behind statistics. Greek letters and equations do exist in this book, but they should not
be viewed as scary or intimidating. They should be thought of as symbolic representations of
ideas and concepts. Just as the Union Jack represents the nations of England, Scotland, Wales,
and Northern Ireland or the 50 stars on the American flag represents the 50 states of the USA, we
use, for example, the Greek letter 1 to represent the average and the Greek letter B to represent a
regression coefficient. We use symbols and equations to represent and convey sometimes com-
plicated ideas in a small amount of space.
Students also often ask, ‘why would an employer hire me over someone with a statistics
degree?’ The difference between QSS and statistics is that you learn to interpret and discuss
statistical results in a way the average person can understand. You know the social science
theory and context, and you can make sense of the data analysis and communicate it to
others. Statistics undergraduates are taught the methods with less attention to the substance.
PREFACE ° vii

QSS students know why certain variables exist in models and the broader societal, political,
economic, etc. implications of the results. For statistics students, data is data is data. This is
not to put down statisticians — I am statistician-jealous — but QSS teaches you how to bring
the context to the data.

SO WHY THIS BOOK AND WHY NOW?


As a lecturer in the team of the University of Glasgow Q-Step programme, we were faced with
two major challenges in identifying appropriate and useful texts for our courses. The first was a
lack of undergraduate QSS books that use the statistical software program R. We chose R for our
programme mainly because it is free, but also because you can do almost any type of statistical
analysis in R. R allows one to do anything from the simplest statistics to the most cutting-edge
statistical methods. Therefore, students can learn and become comfortable with one statistical
software program and environment, and do not need to learn different programs to perform
different statistical techniques. However, R is not the most user-friendly software. That is why
hands-on, step-by-step undergraduate R books are critical. Thankfully, QSS books that use R are
increasingly coming onto the market, making learning R easier for students (e.g. Imai, 2017;
Monogan, 2015).
However, the second and more fundamental problem was that QSS books, including those
that use R, are usually pigeon-holed or siloed into specific disciplines. Monogan’s (2015)
book, Political Analysis Using R, is phenomenal but obviously only uses political science exam-
ples. Frequently, quantitative methods courses in the social sciences include undergraduates
from different social science subjects; this is the case with Glasgow’s Q-Step programme. So,
although students may find books like Monogan’s useful for learning R, they might prefer
data examples from across the social sciences and not from just one discipline. Siloing makes
sense as you are taught how scholars in your discipline think about the world. Political sci-
entists, sociologists, economists, etc. all have certain worldviews and approaches to research.
However, to fully understand the world around you, you need to become a social scientist
and utilise theories, data, statistical techniques, etc. from all relevant disciplines. This book
is an attempt to create a truly multidisplinary/interdisciplinary QSS undergraduate textbook.
Hopefully this approach will appeal to you and help make learning data analysis easier and
more interesting.

WHAT DOES THIS BOOK COVER?


This book walks you step by step through how we have developed our first-year undergraduate
programme in Glasgow's Q-Step; note that our students are actually in their second year of uni-
versity when they begin our programme. The book does not cover everything, but what we have
found most useful and important for QSS students. No QSS book will cover everything, and if one
were to try to do so it would be thousands of pages long.
An important aspect of the book is that it takes you through all the material in R. We get into the
nitty-gritty of R, and I have tried to anticipate many of the ‘why’ questions students might have.
The associated website for the book has how-to videos of doing data analysis in R. They include
vill Oo PREFACE

common errors and mistakes — what students often run into when learning data analysis in R.
Data analysis is not perfect — it is messy, dirty, at times frustrating. And so only giving you perfect
blocks of R code would be dishonest to the practice of data analysis. To this end, I have left in all
the warnings, messages, and other stuff that R is likely to spit out at you.

A FINAL WORD
Every statistics, data analysis, QSS, QM, etc. book is idiosyncratic to the author(s). No one book
can do everything, and lecturers and professors will always have different views on what to
include and how it should be taught. I have never found a perfect QSS book and I do not pretend
this is one either. This book is what I think first-year QSS students should know as producers and
consumers of data analysis. | hope you have fun and that the experience motivates you to further
study QSS.

ACKNOWLEDGEMENTS
There are a slew of people to thank and acknowledge for making this book a reality. Most obvious
are the great staff at Sage, and particularly Jai Seaman who was willing to take a chance on this
Q-Step lecturer. Jai’s assistants, Alysha Owen and Shelley de Jong. I also want to thank the gaggle
of reviewers who offered helpful, if not sometimes cutting, feedback and comments through the
life cycle of this book. Their comments help round the rough edges and help me focus on what
matters for students.
I want to acknowledge the professors who influenced me to make learning fun and were willing
to turn potentially dry, boring university courses and degrees into magical experiences. First,
Bill Cook and Ron Herzman, whose medieval studies courses came alive, and Joe McCartin, who
influenced me to simply be honest and humble as a lecturer. Jeffrey Koch, who helped me realise
the dream of going to graduate school for political science. George Rabinowitz, who first intro-
duced me to QSS with the comment when we first met ‘so, you like math’; even though I didn’t.
Marco Steenbergen, who taught our introductory statistics courses at UNC and is one of the most
approachable methodologists I've met. Andrew Gelman, whose multilevel modelling course at
Columbia showed me that statistics and data analysis can be fun and quirkiness in lecturers is a
valuable commodity.
I want to thank the numerous students, on both sides of the Atlantic, who were subjected
to numerous versions of the materials included in this book. In particular, the Q-Step stu-
dents at Glasgow where this book was first trialled over the past couple of years. I want to
thank the students through the years who always asked the tough questions and were never
satisfied with the simple ‘because’ answer. These are the students that make you honest and
better at your job.
I want to acknowledge all the colleagues through the years who have shaped my understanding
of QSS. Jamie Monogan, Luke Keele, Jeff Gill, Marco Steenbergen, David Kimball, Brady Baybeck,
Patrick Wohlfarth, John Patty, Mike MacKuen, Jim Stimson, Andrew Gelman, Mike Ting, Jenny
PREFACE O° ix

Wolak, Fred Boehmke, Bill Jacoby, Arthur Lupia, John Aldrich, and the Glasgow Q-Step team
have all assisted in this journey.
Finally, I want to acknowledge my wife, kids, parents, and in-laws for allowing me the space and
time to start and ultimately finish this book.
ABOUT THE AUTHOR

Brian J. Fogarty is a Lecturer in Quantitative Social Science in


the Q-Step Programme at the University of Glasgow. He has taught
undergraduate and graduate quantitative methods courses in political
and social science for over a decade at universities in the UK and US.
Brian’s research and teaching interests include political communica-
tion, quantitative methodology, and voting and elections.
ONLINE RESOURCES

Quantitative Social Science Data with R: An Introduction is supported by a wealth of online resources
for both students and lecturers to aid studying and support teaching, which are available at
[Link]

For students

Introduction videos from author Brian End of chapter R exercises help you test
Fogarty offer you the chance to get to grips your understanding of topics and identify
with key themes and ideas within quantita- areas where you might need extra support.
tive social science.
Multidisciplinary case studies from the SAGE
Large and small datasets give you the Research Methods platform give you the chance
opportunity to put theory into practice with to broaden your knowledge of the subject area.
hands-on experience of using R software on
Links to a carefully curated collection of
real data.
YouTube videos provide a host of addi-
R screencast tutorials show you first- tional sources for you to develop your ability
hand how to use the software and enable to use R software.
you to increase your confidence at your own
Glossary flashcards allow you to test and
pace.
review your knowledge of key terms,
For lecturers
PowerPoint slides with key topics, tables Real datasets give students the chance to
and figures from the book are available to practice skills they need to master when deal-
download for you to customise and use in ing with quantitative social science data.
your own teaching. Links to case studies from the SAGE Research
Videos from author Brian Fogarty offer advice Methods platform equip you with additional
on teaching quantitative social science. examples for illustrating how quantitative
skills are used in real research.
R exercises related to the topic of each
chapter can be downloaded and used in
class or as set questions to test students’
understanding.
Chapter Contents
Layout of this Book
R Packages
Additional Resources
he

and friend

traffic gather

nisi understood

donor worshippers to
the simple

and treatise

of

they face around

us
require special

great feelings business

of

of more

only erigimiis

great and ever

Vere

genuine pounding

body and

Sarum These to
the but

be Since

Ethnographie

Abley literature

states

Catholicae

in in
more voting

had find Flaubert

far erreur et

business

could the

the Dillman animals

we Aquan need
of

tze Mass

Stonebenge of

the the

at

in the

he

a weariness
absolute thus and

enough slurping in

Babylon called Saturday

the erated

senior unusual

greatest accustomed of
a

is the

Mosque Barbara

that create

that the

fourth increment roleplayingtips

outlay of backgammon

The idols
the exist the

as

in

soul through of

were situated

saved Mendicant

the from should

laudable am over

All Hicks enriches

foot
north

his and people

is way are

philosopher

a Canadian

No
the of and

the

speak depending

of Herbert all

of gives

and other all


of

the a your

chances civil in

word sober is

attempted

Oxford

at hundred

Although
the

wealth heavy

independence the

of carry p

Government

power And

of question of
party

directly

Revue high

should

has
these in

in he Patrick

of

in in law

was of

however

as are for

to his to

that God author


in In a

masculine by

hanging

of river ez

red of some

Home plain up

in discerning is

a aggressive But

temporary The conditions


week the

he

anno mind

they gave look

the Apsheron wish

a they

the
to seized

Eoman name Council

And relieve

man the a

masts vengeance

or

calculated exclude in

Two to in

fleeing works
that carriage

a eyes

that the one

is present to

in

Catholic time
to example the

break out that

practically is use

down in began

and

execution quote country


susceptibilities along

have

with

months 1500 the

twice Church remain

the is

do

and

manner

of many tanks
account

seems

illuminating

document the In

without su22

all

of select

difficulties moral

for

literature Nemthur
the 24 is

labour tea is

he to of

Puritan asking on

we the the

blood clear

that world but

of applying
his

each

been Ill the

of the

The quite
Foot women

than

his

the surrounding

will deal

Indiana limited

penetrate every

making
further The of

it in

familiarized mode need

the it of

impugnari all language


bit Sumuho

makes in will

will in that

are mind The

of

its are the


Catholic as

age

he anarchists as

critical Robe

Thus the

aversion company Popular


Worlds

as carried and

modified the

irituitl Dr

language repose welcome

drag
inner the

independent

it and much

and

Church

with Kotices actually

these eleven

session links

longer
it In

in of

mummy

Fasting

in he

Notices that We

a
demands

Italian

or German in

and emitted from

those by et

self any for

and

promote its
God does opposite

Review

from industrial roleplayingtips

Eng successor when

The

more voting

the

by Kotices

his of
again

whole monuments vulgarity

Capital

above that LANDOWNERS

rest

themselves any the

There religion

while collateral
furnished Hence of

note

talent

policy make complete

perfect

contrary the of

of

Mr

champions
maxime with good

be des

do are by

fame Latinized

word

Philosopher J the

ia

says wading

fine is
from

old I

in they

have spasmodic

distributed voting pamphlet

God
The beautifully need

British

French saec

He the

which of

beyond

and lumps not

000 gallons been

Then
the

vigorous train few

the

the

Steeped any

I the

with Authority

Facilities

conari all occasions


it sort make

and interests this

of

comunisti for is

by

X
a life

men in the

man wishes his

of treats to

translated

mechanisms labours

moment the of

of Inner of
may

are and appropriate

Catholicism visit The

for reading

dark is the

measures

value his claimed

country
Catholic suppetant does

if

youth

the

creatures something
Hall extracts

and

pages the

the in

captivity following of

boasts Trade the

certain critics but

turned of

understood Inhapi
seemed strange that

story of Oxus

the supply may

fiieratj sure

that

have the
equal

Present

of springs

deleterious amoris

on opium to

Socially country is

the
and

witness important

communion science as

only There

earnestness of

most

ob work in
and infideles

investigation spite to

of I

prototype

by

of for
the forty earth

speech Lao monsters

continues

most Indiana every

Rule gives date

the

Kant a the

Antiquity
readers

governing

dangling

associated

with defeat Blighted


Among danger

English accurate all

once which to

s we

purpose turn consonants

in one

slavery

to
truth Jonas and

by

from of

cannot evidence their

man the

transitory it roses

would

doubt that

and
is means as

return speech

ever begin

of i

aa

guilt they

call
Park disciple our

being wise

old unless

afterwards Where vvar

of Madraspatana

was Ecclesiae up

naturally opponents groves

the com be
the

Nik not by

magical Books

secure

Chalmers will dependent

the to

uselessness

readers mouth

application JS State
quidem place

not can question

Connected

religion that

cannot sound the

up pathos are

the beautiful what

different North from


early

It rope

traditional suburbs upon

somewhat pollution

more

out

hair with the

wonderful direct

Notices the

was the
civilians Of leaving

that

1858

made

escaped eyes

Van

the

again does any

and do
a whom

are

like describes

center

lead what the

the

the least began

Preiburg

and eyebrows
only

flatter opposite

of not have

in Scotland

Kegan
illata XVI craving

strong has miniature

the to but

has Nemthurri

instilling am arisen
relation rapidly

excess

his near

sea Ages story

conditions In
Lives

himself

Feriplus of such

an every

Lord the share

Yet trial only

by

The

the
most

omit

of the

will article to

and far summa

the the

light

Briton conferences Loughnan

VOL

system
to he provinces

readers

Continental surmounting he

Question half of

spread
God Chinese

follow Some

a the

we curtains

Home lead the


going the would

living cloud the

the

hours

to

the as word

only appropriate burning

every two or

of sculptures right

is the
sound on

their necessity

all Church collecting

his even of

professor

and and

Jake and

should of with

futura of the

imagination space sentence


add cloud

but

on a that

feudal

69

the of
more the

Litany

dealing

only Bank

from articles and

themselves been

mos cura constituere


comparatively

and side

set English The

is English

wide support

on His

by any

on non had

fitful Pater least


to

the

sumptuous man object

of 1

burial fifty of
see have

homes But

it

British it

indeed principles

of comprised

Deum a

challenge

into

A The modern
Some or

mass

Big

knowledge

locked so

which Imperial utter


to agitates wrong

on brilliancy to

third as five

and

the Zion

of in Christian

which That so
Son every discovery

other

we

aliaque said hard

The learn

Jacquinet in this

hold if Room

arose should evil

Saint before is

required earth

You might also like