Question

In: Statistics and Probability

In R: Consider dataset “juul” from library “ISwR”. (juul is a built in data set) Are...

In R:

Consider dataset “juul” from library “ISwR”. (juul is a built in data set)

Are the means of igf1 equal among tanner groups at 5% level?

Please use the six step process to test statistical hypotheses for this research problem.

Note: You need to convert tanner from numeric to factor type and ignore all the NAs.

Solutions

Expert Solution

Solution :

Here , we have to consider the dataset “juul” from library “ISwR” in R software.

To test whether the means of "igf1" are equal among the 5 tanner groups at 5% level.

Step 1) Hypothesis :

Thus , here we are to test the hypothesis ,

where , is the mean of the ith igf1 group.

Here , we are going to use the one - way ANalysis Of VAriance (ANOVA).

The complete ANOVA analysis is done in the R Statistical Software.

Step 2) Assumption :

The assumption of HOMOSCEDASTICITY or EQUAL VARIANCES is considered among the 5 tanner groups.

Step 3) Let the value of the level of significance () be 5% = 0.05.

The appropiate test statistic for testing the above hypothesis is given as ,

k = level of the tanners ; n = total number of observations

Step 4) Rejection Region : We reject the null hypothesis H0 at 5% iff ,

Step 5) Calculations and Output :

The ANOVA table in R is given below.

Clearly , we can see that , the value of the test statistic and the p-value is ,

The critical value is given as ,

Step 6) Conclusion :

Since ,   and , we Reject the null hypothesis H0 at 5% level of significance and conclude on the basis of the given data that the means of igf1 are not equal among tanner groups at 5% level.

The R codes are given below !!

library(ISwR)
attach(juul)
head(juul)
tanner=juul$tanner
igf1=juul$igf1
igf1[which(is.na(tanner))]=NA
tanner[which(is.na(igf1))]=NA
data.frame(igf1,tanner)
igf1=na.omit(igf1);igf1
tanner=na.omit(tanner);tanner
data.frame(igf1,tanner)
tanner=factor(tanner);tanner
fit=lm(igf1~tanner)
anova(fit)
qf(0.95,4,787)


Related Solutions

warpbreaks is a built-in R dataset which gives This data set gives the number of warp...
warpbreaks is a built-in R dataset which gives This data set gives the number of warp breaks per loom, where a loom corresponds to a fixed length of yarn. We are interested in some descriptive statistics related to the warpbreaks dataset. We can access this data directly and convert the time series into a vector by using the assignment x <- warpbreaks$breaks. (In R, use ? warpbreaks for info on this dataset.) The values of x if assigned as above...
Instructions tell you how to get the data in R R has built in dataset called...
Instructions tell you how to get the data in R R has built in dataset called Iris. This famous (Fisher's or Anderson's) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. We are interested in estimating the length of Petal (Y) using the length of Sepal (X). First, load the...
Load the USArrests sample dataset from the built-in datasets (data(USArrests)) into R using a dataframe (Note:...
Load the USArrests sample dataset from the built-in datasets (data(USArrests)) into R using a dataframe (Note: Row names are states, not numerical values!). Use the kmeans package to perform a clustering of the data with increasing values of k from 2 to 10 - you will need to decide whether or not to center/scale the observations - justify your choice. Plot the within-cluster sum of squares for each value of k - what is the optimal number of clusters? Use...
R has a number of datasets built in. One such dataset is called mtcars. This data...
R has a number of datasets built in. One such dataset is called mtcars. This data set contains fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973-74 models) as reported in a 1974 issue of Motor Trend Magazine. We do not have to read in these built-in datasets. We can just attach the variables by using the code attach(mtcars) We can just type in mtcars and see the entire dataset. We can see the variable...
ANSWER USING R CODE Using the dataset 'LakeHuron' which is a built in R dataset describing...
ANSWER USING R CODE Using the dataset 'LakeHuron' which is a built in R dataset describing the level in feet of Lake Huron from 1872- 1972. To assign the values into an ordinary vector,x, we can do the following 'x <- as.vector(LakeHuron)'. From there, we can access the data easily. Assume the values in X are a random sample from a normal population with distribution X. Also assume the X has an unknown mean and unknown standard deviation. With this...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer the question. (1) Conduct one-way ANOVA test to test if the mean of igf1 of each level of tanner are the same? (2) What is the mean of igf1 in each level of tanner? (3) If there is any difference, which ones appear to be different? (Use pairwise t test for each pair of level with bonferroni method)
The data set ”airquality” in the R datasets library has data on ozone concentration, wind speed,...
The data set ”airquality” in the R datasets library has data on ozone concentration, wind speed, temperature, and solar radiation by month and day for May through September in New York. Attach airquality to your workspace and then construct side-by-side boxplots of Wind by Month. Month is a numeric variable in the airquality data frame. You can treat it as a factor by using the ”as.factor” function, e.g., > plot(Wind ∼ as.factor(Month)) Next, do an analysis of variance to determine...
Using the "mammals" dataset from the "MASS" library in R: body brain Arctic fox 3.385 44.50...
Using the "mammals" dataset from the "MASS" library in R: body brain Arctic fox 3.385 44.50 Owl monkey 0.480 15.50 Mountain beaver 1.350 8.10 Cow 465.000 423.00 Grey wolf 36.330 119.50 Goat 27.660 115.00 Roe deer 14.830 98.20 Guinea pig 1.040 5.50 Verbet 4.190 58.00 Chinchilla 0.425 6.40 Ground squirrel 0.101 4.00 Arctic ground squirrel 0.920 5.70 African giant pouched rat 1.000 6.60 Lesser short-tailed shrew 0.005 0.14 Star-nosed mole 0.060 1.00 Nine-banded armadillo 3.500 10.80 Tree hyrax 2.000 12.30...
Consider the diamonds data set. How many diamonds are there in the dataset with a cut...
Consider the diamonds data set. How many diamonds are there in the dataset with a cut considered Premium? 4906 12082 13791 21551 1610
install.packages("mosaic") library(mosaic) Data=(RailTrail) RailTrail above is the data set it can be found in R (a)...
install.packages("mosaic") library(mosaic) Data=(RailTrail) RailTrail above is the data set it can be found in R (a) Perform multivariate regression model that can predict the variable volume based on the variables hightemp, lowtemp, cloudcover, precip,. Interpret and discuss all the necessary statics from the output. (b) Test whether cloudcover can be dropped from the regression model given that precipitation, hightemp, and lowtemp are retained. Use the F statistic and level of significance 0.01. State the hypotheses, p-value, and conclusion in terms...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT