Purchase Solution

Generalized Linear Model Using R

Not what you're looking for?

Ask Custom Question

Please find the attached files for details.

Purchase this Solution

Solution Summary

The expert examines a generalized linear model using R.

Solution Preview

Diet and Colon Cancer
The data consists of the following variables:
Response: Whether the cell died (=1) or not (=0)
Rat ID: a number between 1 and 12 specifying identity number of the rats
Diet ID: a number between 1 and 4 specifying identity the type of diet ()
Age: Age of the cell where t = 0 at the bottom of each crypt (less mature cells) and t = 1 at the top of each crypt (more mature cells)
Preliminary Analysis
Number of Observations for different combinations of RatID and DietID are given below.

tapply(Data$response, list(diet.id=Data$diet.id,rats.id=Data$rats.id), sum, na.rm=TRUE)
rats.id
diet.id 1 2 3 4 5 6 7 8 9 10 11 12
1 20 56 50 NA NA NA NA NA NA NA NA NA
2 NA NA NA 42 45 49 NA NA NA NA NA NA
3 NA NA NA NA NA NA 63 68 65 NA NA NA
4 NA NA NA NA NA NA NA NA NA 52 55 51

Mean value for age for different combinations of RatID and DietID are given below.
# Table for age:
tapply(Data$age, list(rats.id=Data$rats.id,diet.id=Data$diet.id), mean, na.rm=TRUE)
diet.id
rats.id 1 2 3 4
1 0.5 NA NA NA
2 0.5 NA NA NA
3 0.5 NA NA NA
4 NA 0.5 NA NA
5 NA 0.5 NA NA
6 NA 0.5 NA NA
7 NA NA 0.5 NA
8 NA NA 0.5 NA
9 NA NA 0.5 NA
10 NA NA NA 0.5
11 NA NA NA 0.5
12 NA NA NA 0.5

Mean value for crypt for different combinations of RatID and DietID are given below.
# Table for crypt:
tapply(Data$crypt, list(rats.id=Data$rats.id,diet.id=Data$diet.id), mean, na.rm=TRUE)
diet.id
rats.id 1 2 3 4
1 7480.427 NA NA NA
2 6848.716 NA NA NA
3 16466.697 NA NA NA
4 NA 6941.557 NA NA
5 NA 5832.636 NA NA
6 NA 5395.014 NA NA
7 NA NA 7202.949 NA
8 NA NA 1932.533 NA
9 NA NA 5506.572 NA
10 NA NA NA 4761.524
11 NA NA NA 7209.694
12 NA NA NA 5955.999

General Linear Model

Generalized linear models are extensions of traditional regression models that allow the mean to depend on the explanatory variables through a link function, and the response variable to be any member of a set of distributions called the exponential family ...

Purchase this Solution


Free BrainMass Quizzes
Measures of Central Tendency

Tests knowledge of the three main measures of central tendency, including some simple calculation questions.

Measures of Central Tendency

This quiz evaluates the students understanding of the measures of central tendency seen in statistics. This quiz is specifically designed to incorporate the measures of central tendency as they relate to psychological research.

Terms and Definitions for Statistics

This quiz covers basic terms and definitions of statistics.

Know Your Statistical Concepts

Each question is a choice-summary multiple choice question that presents you with a statistical concept and then 4 numbered statements. You must decide which (if any) of the numbered statements is/are true as they relate to the statistical concept.