Publications by Andrea Carpignani
Milestone Report
Initial Setup To prepare the environment for this analysis let us first of all set up a directory where the project is going to be stored, and let us load the packages that we are going to use during this analysis. setwd("~/Desktop/Coursera/Capstone Project/") library(ggplot2) library(stringr) library(tm) ## Loading required package: NLP ## ## Att...
5036 sym R (8293 sym/33 pcs) 4 img 1 tbl
DDP - Second Peer Assignment
2023-02-17 Introduction The following presentation shows the usage of plotly to create interactive plots with time series. European Stock Market Let us load the packages needed and the data from EuStockMarkets available in R. library(dplyr) library(tidyr) library(plotly) data("EuStockMarkets") Create a time series from the EuStockMarkets data set....
458 sym R (257 sym/3 pcs)
DDP1 - The places of my life
The places of my life Remark: I am showing the code of the map for the benefit of the marker. Please use the interactive map to go through the map and discover the important places of my life. Enjoy the tour. library(leaflet) df <- data.frame(name = c("Via Nievo", "Via XX Settembre", "Pontormo", "DM Unipi", "Angus Drive"...
221 sym R (1046 sym/2 pcs)
Regression Models Peer Assessment
Introduction The following report examines the relationship between the consumption in miles per gallon mpg in the data set mtcars using linear regression. The following two queries are addressed and answered: “Is an automatic or manual transmission better for MPG” “Quantify the MPG difference between automatic and manual transmissions” T...
4044 sym R (5029 sym/26 pcs) 3 img
Coursera Regression Models Quiz 3
Question 1 Consider the mtcars data set. Fit a model with mpg as the outcome that includes number of cylinders as a factor variable and weight as confounder. Give the adjusted estimate for the expected change in mpg comparing 8 cylinders to 4. Answer. Let us first load the data set and have a look at it. data(mtcars) head(mtcars) ## ...
3471 sym
Coursera Regression Models Quiz 2
Question 1 Consider the following data with x as the predictor and y as as the outcome. x <- c(0.61, 0.93, 0.83, 0.35, 0.54, 0.16, 0.91, 0.62, 0.62) y <- c(0.67, 0.84, 0.6, 0.18, 0.85, 0.47, 1.1, 0.65, 0.36) Give a P-value for the two sided hypothesis test of whether \(\beta_1\) from a linear regression model is 0 or not. Answer. From the linear mo...
3713 sym
Coursera Regression Models Quiz 2
Question 1 Consider the following data with x as the predictor and y as as the outcome. x <- c(0.61, 0.93, 0.83, 0.35, 0.54, 0.16, 0.91, 0.62, 0.62) y <- c(0.67, 0.84, 0.6, 0.18, 0.85, 0.47, 1.1, 0.65, 0.36) Give a P-value for the two sided hypothesis test of whether \(\beta_1\) from a linear regression model is 0 or not. Answer. From the linear mo...
3713 sym
Coursera Reproducible Research
On the impact of severe weather in the US on health and economy Synopsis The study the follows investigates the relationship between severe weather in the US based on the official data from the National Oceanic and Atmospheric Administration (NOAA). The NOAA database shows the number of injuries and fatalities occurred during a meteorological ev...
4776 sym R (8252 sym/33 pcs) 2 img