Publications by Hossein Bahreinizad

Document

13.08.2023

library(readxl) ## Warning: package 'readxl' was built under R version 4.2.3 dat1<- read_excel("C:\\Users\\18063\\Downloads\\anova_data.xlsx",sheet = 1) model <- aov(dat1$obs~dat1$material+dat1$`muscle activation`+dat1$time,data = dat1) summary(model) ## Df Sum Sq Mean Sq F value Pr(>F) ## dat1$material ...

11 sym R (1418 sym/8 pcs)

Document

31.03.2023

dat <- read.csv(file.choose(),header = TRUE,stringsAsFactors = TRUE) library(dplyr) dat$x6.regular.irregular.sleep <- na_if(dat$x6.regular.irregular.sleep,"") dat$smoking..Yes.No.Some. <- na_if(dat$smoking..Yes.No.Some.,"") dat$Degree.Seeking..MS.PhD. <- na_if(dat$Degree.Seeking..MS.PhD.,"") dat$Dietary..Veg.NoVeg. <- na_if(dat$Dietary..Veg.No...

2853 sym R (18258 sym/23 pcs)

FA12

28.03.2023

setwd("C:/Users/Hossein/Downloads") dat <- read.csv('data-table-B8(6).csv') a) Fit a first order model and check the VIF for the fitted regression parameters model <- lm(y~x1+x2,data = dat) library(car) summary(model) ## ## Call: ## lm(formula = y ~ x1 + x2, data = dat) ## ## Residuals: ## Min 1Q Median 3Q Max ## -9...

1177 sym R (3498 sym/17 pcs)

FA11

21.03.2023

data <- read.csv(file.choose()) y <- data$y x1 <- data$x_1 x2 <- data$x_2 x3 <- data$x_3 x4 <- data$x_4 a) When you regress y on all four predictors, what do you notice about the p-value for the f-statistic and the t-tests for the individual regression coefficients? model <- lm(y~x1+x2+x3+x4) summary(model) ## ## Call: ## lm(formula = y ...

969 sym R (2619 sym/14 pcs)

Document

28.02.2023

dat <- read.csv(file.choose()) deliverytime <- dat$DeliveryTime.min. obs <- dat$Observation numc <- dat$NumCases distance <- dat$Distance.ft. model <- lm(deliverytime~numc+distance+numc:distance) summary(model) ## ## Call: ## lm(formula = deliverytime ~ numc + distance + numc:distance) ## ## Residuals: ## Min 1Q Median 3Q...

1782 sym 9 img

Implant_anova

25.02.2023

Here are the implant stress results: library(readxl) ## Warning: package 'readxl' was built under R version 4.2.2 a <- read_excel(file.choose(),sheet = "implant_von") # implant stress library(MASS) library(dplyr) ## Warning: package 'dplyr' was built under R version 4.2.2 ## ## Attaching package: 'dplyr' ## The following object is masked from '...

177 sym R (12515 sym/32 pcs)

Document

23.02.2023

dat <- read.csv(file.choose()) obs <- dat$y x1 <- dat$x1 x2 <- dat$x2 a) model <- lm(obs~x1+x2+x1:x2, data = dat) summary(model) ## ## Call: ## lm(formula = obs ~ x1 + x2 + x1:x2, data = dat) ## ## Residuals: ## Min 1Q Median 3Q Max ## -7.0753 -3.6781 0.4395 3.1321 8.8448 ## ## Coefficients: ## ...

726 sym R (1922 sym/10 pcs) 3 img

FA3

31.01.2023

days <- c(91, 105, 106, 108, 88, 91, 58, 82, 81, 65, 61, 48, 61 ,43, 33, 36) index <- c(16.7, 17.1, 18.2, 18.1, 17.2, 18.2, 16, 17.2, 18, 17.2, 16.9, 17.1, 18.2, 17.3, 17.5, 16.6) Question 1: Regress Days on Index using simple linear regression, what are the estimates of your fitted regression line? model <- lm(days~index) plot(index,days) a...

2110 sym 2 img

Flipped assignment 3

06.09.2022

1 Descriptive statistics In this project we will compare the heart rate of male and female. We will calculate the minimum, maximum, sample mean, sample standard deviation, sample median and quartiles of the resting heart rate for both male and female groups. As the blood supplies the body with nutrition, any variation in the heart rate can h...

2525 sym 5 img

FA 04

08.09.2022

1 Reading data data <- read.csv("https://raw.githubusercontent.com/tmatis12/datafiles/main/US_Japanese_Cars.csv") 2 Question 1 qqnorm(data$USCars,main = "UScars normal plot") qqline(data$USCars) qqnorm(data$JapaneseCars, main = "Japancars normal plot") qqline(data$JapaneseCars) These plots suggest that both distributions could be n...

1032 sym 6 img