Publications by 111078517
Ensemble Predictions
helped by 111078513 insurance <- read.csv("C:/R-language/BACS/insurance.csv") Question 1) Create some explanatory models to learn more about charges: 1-a) Create an OLS regression model and report which factors are significantly related to charges insu_lm <- lm(charges ~ age + sex + bmi + children + smoker + region, data = insurance) summary(i...
3243 sym R (9616 sym/35 pcs) 1 img
Predictions
Helped by 111078513 # Load the data and remove missing values cars <- read.table("C:/R-language/BACS/auto-data.txt", header=FALSE, na.strings = "?") names(cars) <- c("mpg", "cylinders", "displacement", "horsepower", "weight", "acceleration", "model_year", "origin", "car_name") cars$car_name <- NULL cars <- na.omit(cars) # IM...
3612 sym R (8632 sym/35 pcs)
Structural Equation Modeling
library(seminr) ## Warning: 套件 'seminr' 是用 R 版本 4.2.3 來建造的 secdata <- read.csv("C:/R-language/BACS/security_data_sem.csv") Question 1) Composite Path Models using PLS-PM 1-a) Create a PLS path model using SEMinR, with all the following characteristics: 1-a-i) Measurement model – all constructs are measured as composites: ...
1270 sym R (23722 sym/30 pcs) 1 img
Comparison between Principal components & Rotated components
helped by 111078513 Question 1) Earlier, we examined a dataset from a security survey sent to customers of e-commerce websites. However, we only used the eigenvalue > 1 criteria and the screeplot “elbow” rule to find a suitable number of components. Let’s perform a parallel analysis as well this week: library(readxl) secQue <- read_exce...
3810 sym R (4142 sym/36 pcs) 1 img
Eigen values and vector
Question1) Question 1) Let’s revisit the issue of multicollinearity of main effects (between cylinders, displacement, horsepower, and weight) we saw in the cars dataset, and try to apply principal components to it. 1-a) Let’s analyze the principal components of the four collinear variables. 1-a-i) Create a new data.frame of the four log-t...
3251 sym R (5321 sym/21 pcs) 1 img
Do the linear regression with nonlinearity and multicollinearity
Question 1) Let’s deal with nonlinearity first. Create a new dataset that log-transforms several variables from our original dataset (called cars in this case): cars <- read.table("C:/R-language/BACS/auto-data.txt", header=FALSE, na.strings = "?") names(cars) <- c("mpg", "cylinders", "displacement", "horsepower", "weight", "...
5014 sym 5 img
Does video attract you more? Using ANOVA to test the intendency to share.
pls1 <- read.csv("C:/R-language/BACS/pls-media/pls-media1.csv") pls2 <- read.csv("C:/R-language/BACS/pls-media/pls-media2.csv") pls3 <- read.csv("C:/R-language/BACS/pls-media/pls-media3.csv") pls4 <- read.csv("C:/R-language/BACS/pls-media/pls-media4.csv") Question1) Explore the data. 1-a) What are the means of viewers’ intentions to share (I...
3863 sym 1 img
T-test about service response time
Question 1) a)Pick a reshaping package (we discussed two in class) – research them online and tell us why you picked it over others (provide any helpful links that supported your decision). I choose to pick reshape2 package. According to the R Documentation, tidyr is “is designed specifically for tidying data, not general reshaping (resha...
4834 sym R (3502 sym/28 pcs) 5 img
T-statistics and type(I,II) error
Question1) a)Imagine that Verizon claims that they take 7.6 minutes to repair phone services for its customers on average. The PUC seeks to verify this claim at 99% confidence (i.e., significance α = 1%) using traditional statistical methods. i)Visualize the distribution of Verizon’s repair times, marking the mean with a vertical line data...
7335 sym 3 img
[Portfolio] Online retail analysis
Hi there! Welcome to my data visualization land. Today I will use the data set which is very classic containing all the transactions occurring between 12/01/2010 and 12/09/2011 for a UK-based and registered non-store online retail. let’s see what we can find in it! Import and Examine the Data require(data.table) ## 載入需要的套件:da...
4917 sym Python (24028 sym/63 pcs) 5 img 1 tbl