Publications by Kunal Dolas

Homework9_1kd

06.12.2020

Using the teengamb data, model gamble as the response and the other variables as predictors. Investigate the possibility of interactions between sex and the other predictors. Interpret your final model by explaining what the regression parameter estimates mean. library(faraway) data(teengamb) teengamb ## sex status income verbal gamble ## 1 ...

540 sym R (5655 sym/12 pcs) 4 img

homework9_2kd

06.12.2020

The anaesthetic data provides the time to restart breathing unassisted in recovering from general anaesthetic for four treatment groups. Produce a boxplot depicting the data. Comment on any features of interest. library(faraway) data(anaesthetic) anaesthetic ## breath tgrp ## 1 3 A ## 2 6 B ## 3 3 C ## 4 4 ...

723 sym R (6002 sym/19 pcs) 4 img

Document

04.02.2021

library(sparcl) n <- nrow(iris) p2 <- 10 set.seed(32611) iris_noise <- matrix(rnorm(n*p2), ncol=p2) iris_label <- iris$Species iris2 <- cbind(iris[,1:4], iris_noise) iris2 <- scale(iris2) iris2 <- as.matrix(iris2) head(iris2) ## Sepal.Length Sepal.Width Petal.Length Petal.Width 1 2 ## [1,] -0.8976739 1.01560199 -1.3...

22 sym R (3547 sym/13 pcs) 3 img

STAT2_HW1

03.02.2021

####Q1:Fit a model with Class as the outcome and all of the covariates as predictors, then reduce the model using the step function. Report your final model and the deviance. Can you use the deviance to tell if the final model fits the data? library(faraway) library(tidyverse) ## ── Attaching packages ─────────────�...

36 sym R (52358 sym/29 pcs) 1 img

HW3_6937

04.02.2021

library(sparcl) n <- nrow(iris) p2 <- 10 set.seed(32611) iris_noise <- matrix(rnorm(n*p2), ncol=p2) iris_label <- iris$Species iris2 <- cbind(iris[,1:4], iris_noise) iris2 <- scale(iris2) iris2 <- as.matrix(iris2) head(iris2) ## Sepal.Length Sepal.Width Petal.Length Petal.Width 1 2 ## [1,] -0.8976739 1.01560199 -1.3...

22 sym R (2485 sym/13 pcs) 3 img

HW4_PHC6051

04.03.2021

The data set sim1.out in HW4.RData has two variables, satisfaction with health care (ordinal, 1—5, higher values indicate more satisfaction) and year (0 or 1). A simple random sample was taken from the population in year 0, and a separate simple random sample was taken from that same population in year 1, so you can assume that the two samples ...

668 sym R (3465 sym/29 pcs) 1 img

HW6_Smarket

24.02.2021

This question should be answered using the Weekly data set, which is part of the ISLR package. This data is similar in nature to the Smarket data discussed in class, except that it contains 1,089 weekly returns for 21 years, from the beginning of 1990 to the end of 2010. Produce some numerical and graphical summaries of the Weekly data. Do there...

1520 sym R (5099 sym/32 pcs) 2 img

PHC6177_HW4_question3

22.09.2021

Fit an exponential distribution to the data set Weibull.csv. Calculate and plot the cumulative hazard function and compare it to the Nelson-Aalen curve. Is the exponential distribution a good fit for this data? edu<-read.csv("/Users/kunaldolas/Desktop/phc6177/weibull.csv")## read data ##calculate lambda library(survival) expfit <- survreg(Surv...

311 sym R (1368 sym/6 pcs) 2 img

PHC6177_HW3_question5

14.09.2021

The rats data set in the survival package in R can be loaded by typing “data(rats)”. It contains data on 300 rats-3 selected from each of 100 litters-that were followed for tumor incidence. The variable time is the follow-up times and the variable status is the event indicator. a. How many rats had tumors? What was the total rat-time contribu...

1204 sym R (1769 sym/26 pcs)

PHC6177_HW3_question3

14.09.2021

For each failure-time distribution, generate 1,000 right-censored samples, fit the appropriate model, and get point and interval estimates for lambda (in the exponential model) or for lambda and gamma (for the Weibull and log-logistic models). Are the point estimates close to the true values? Do the 95% confidence intervals contain the true value...

975 sym R (3198 sym/36 pcs)