Publications by Jaquan Seme
Quiz 3
The data set is from a case-control study of smoking and Alzheimer’s disease. The data set has two variables of main interest: smoking a factor with four levels “None”, “<10”, “10-20”, and “>20” (cigarettes per day) disease a factor with three levels “Alzheimer”, “Other dementias”, and “Other diagnoses”. Q1 Describ...
2040 sym 2 img
Quiz 2
# Load packages library(tidyquant) library(tidyverse) # Import stock prices stock_prices <- tq_get(c("WMT", "TGT", "AMZN"), get = "stock.prices", from = "2020-01-01") # Calculate daily returns stock_returns <- stock_prices %>% group_by(symbol) %>% tq_mutate(select = adjusted, mutate_fun = periodReturn, period = "daily") stock_retur...
2023 sym R (2503 sym/9 pcs) 3 img
Bivariate Graphs
In this exercise you will learn to plot data using the ggplot2 package. To answer the questions below, use Chapter 4.3 Categorical vs. Quantitative Data Visualization with R. Q1 Plot the distribution of daily returns by stock using kernel density plots. Hint: See the code in 4.3.2 Grouped kernel density plots. Q2 Plot the distribution of daily...
1593 sym 5 img
Clean Data
In this exercise you will learn to clean data using the dplyr package. To this end, you will follow through the codes in one of our e-texts, Data Visualization with R. The given example code below is from Chapter 1.2 Cleaning data. ## # A tibble: 87 x 13 ## name height mass hair_color skin_color eye_color birth_year gender ## <chr> <int>...
860 sym R (3374 sym/14 pcs)
My First RMarkdown With Code
Use the given code below to answer the questions. Q1 Get Amazon stock prices, instead of Apple. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # for financial analysis ## Import data stocks <- tq_get("AMZN", get = "stock.prices", from = "2016-01-01") stocks ## # A tibble: 1,025 x 7 ## date open hi...
1035 sym R (1022 sym/3 pcs) 1 img
"My First Publication"
Q1 What is R? A program that allows you to code Q2 What is RStudio? Precise version of R Q3 What is R packages? Different Codes that you can download into apps on a phone Note: For help with RMarkdown syntax, go Help > Cheatsheets > R Markdown Reference Guide. Q4 Add a code chunk ...
294 sym
Mock Quiz 1
Use the given code below to answer the questions. Q1 Get Walmart stock prices, instead of Apple. Hint: Insert a new code chunk below and type in the code, using the tq_get() function above. Replace the ticker symbol for Walmart. You may find the ticker symbol for Microsoft from Yahoo Finance. ## Load package library(tidyverse) # for cleaning, pl...
1763 sym R (1035 sym/3 pcs) 1 img
Quiz 1
Use the given code below to answer the questions. Q1 Import Netflix stock prices, instead of Apple. Hint: Insert a new code chunk below and type in the code, using the tq_get() function above. Replace the ticker symbol. Find ticker symbols from Yahoo Finance. ## Load package library(tidyverse) # for cleaning, plotting, etc library(tidyquant) # f...
2230 sym R (2829 sym/7 pcs) 1 img
Quiz 4
tle: “Quiz 4” thor: “Jaquan Seme” tput: html_document: toc: true Make sure to include the unit of the values whenever appropriate. Q1 Build a regression model to predict life expectancy using gdp per capita. Hint: The variables are available in the gapminder data set from the gapminder package. Note that the data set and package bot...
2147 sym 1 tbl