Publications by Datacamp - Jo Hardin
Predictive Analytics using Networked Data in R
Motivation: social networks and predictive analytics Create a network from an edgelist In this exercise, you will create a network from an edgelist. You will create an igraph object from data stored in an edgelist using the function graph_from_data_frame(). The data is a social network of customers and each row of the edgeList dataframe represen...
19785 sym R (20423 sym/91 pcs) 63 img
Multiple and Logistic Regression in R
What if you have two groups? Fitting a parallel slopes model We use the lm() function to fit linear models to data. In this case, we want to understand how the price of MarioKart games sold at auction varies as a function of not only the number of wheels included in the package, but also whether the item is new or used. Obviously, it is expected ...
32315 sym R (23199 sym/97 pcs) 62 img
Experimental Design in R
Intro to experimental design A basic experiment Let’s dive into experimental design. Note that all of these concepts will be covered in more detail in the next video, “Hypothesis Testing.” ToothGrowth is a built-in R dataset from a study that examined the effect of three different doses of Vitamin C on the length of the odontoplasts, the c...
35526 sym R (34792 sym/141 pcs) 51 img
Dealing With Missing Data in R
Introduction to missing data Using and finding missing values When working with missing data, there are a couple of commands that you should be familiar with - firstly, you should be able to identify if there are any missing values, and where these are. Using the any_na() and are_na() tools, identify which values are missing. library(tidyverse) ...
20756 sym R (38823 sym/148 pcs) 135 img
AB Testing in R
Introduction Preliminary data exploration In the video, we read in our preliminary dataset and had a quick look at it. Let’s get some practice reading in data and do a little more exploration. # Load tidyverse library(tidyverse) ## -- Attaching packages --------------------------------------- tidyverse 1.3.0 -- ## v ggplot2 3.3.3 v purrr ...
15202 sym R (21052 sym/85 pcs) 45 img
Inference for Categorical Data in R
The General Social Survey Exploring consci The General Social Survey asks about far more topics than just happiness. Take a moment to poke around this data set and visualize the variables that interest you. When you’re ready, turn your attention to the question of how much confidence people had in the scientific community in 2016. The answers ...
21313 sym R (1314258 sym/129 pcs) 83 img
Fundamentals of Bayesian Data Analysis in R
A first taste of Bayes Let’s try some Bayesian data analysis Coin flips with prop_model The function prop_model has been loaded into your workspace. It implements a Bayesian model that assumes that: The data is a vector of successes and failures represented by 1s and 0s. There is an unknown underlying proportion of success. Prior to being up...
19161 sym R (20181 sym/113 pcs) 128 img
Linear Algebra for Data Science in R
Motivations Creating Vectors in R Vectors can be analyzed in a few different ways in R. One way is to create the vector yourself, and there are a few different means by which you can do this. The rep() command in R creates a vector that repeats the same element a prescribed number of times, while the seq() command creates a vector that follows a...
13826 sym R (24783 sym/176 pcs) 65 img
Bayesian Modeling with RJAGS
The prior model Simulating a Beta prior Suppose you’re running in an election for public office. Let \(p\) be your underlying support, the proportion of voters that plan to vote for you. Based on past polls, your prior model of \(p\) is captured by a Beta distribution with shape parameters 45 and 55. You will approximate the Beta(45, 55) prior...
30438 sym R (29571 sym/151 pcs) 130 img