Question

In: Statistics and Probability

Say I have a random data that consists of crab’s color (C), spine condition (S), weight...

Say I have a random data that consists of crab’s color (C), spine condition (S), weight (Wt), and carapace width (W). The response outcome for each female crab is her number of satellites (Sa).

And the following code I have done is:

model=glm(carb$Sa~1+carb$W,family=poisson(link=log))

Now my main question is, how to do a Rcode on:

I am trying to use a two variable minimization rule and I need help finding the first and second derivatives of poisson so that i could also input the guesses of X and Y variables such as:

X Y~Poisson

0 1

1 1

2 3

Solutions

Expert Solution

#### Poisson Regression of Sa on W

model=glm(crab$Sa~1+crab$W,family=poisson(link=log))

Note that the specification of a Poisson distribution in R is “family=poisson” and “link=log”. You can also get the predicted count for each observation and the linear predictor values from R output by using specific statements such as:

#### to get the predicted count for each observation: 
#### e.g. for the first observation E(y1)=3.810

print=data.frame(crab,pred=model$fitted)
print

#### note the linear predictor values
#### e.g., for the first observation, exp(1.3378)=3.810

model$linear.predictors
exp(model$linear.predictors)

In the output below, you should be able to identify the relevant parts:

  • What do you learn from "summary(model)"? How is this different from when we fitted logistic regression models?
  • Does the model fit well? What does the Value/DF tell you?
  • Is width the significant predictor?

Here is the output:

The estimated model is: log(μi^) = -3.30476 + 0.16405Wi

The ASE of estimated β = 0.164 is 0.01997 which is small, and the slope is statistically significant given its z-value of 8.216 and its low p-value.

Interpretation: Since estimate of β > 0, the wider the female crab, the greater expected number of male satellites on the multiplicative order as exp(0.1640) = 1.18. More specifically, for one unit of increase in the width, the number of Sa will increase and it will be multiplied by 1.18.


Related Solutions

I have the data for corn color and texture. These are the follow up questions for...
I have the data for corn color and texture. These are the follow up questions for the data. Color of Corn Grains Number of Purple (Red) Grains: 75 Number of Yellow (White) Grains: 30 Ratio of Purple (Red) Grains: Yellow (White) Grains: 2.5:1 Probable Genotypes of Parents:   Texture of Corn Grains Number of Smooth Grains: 85 Number of Wrinkled Grains: 20 Ratio of Smooth Grains: Wrinkled Grains: 4.25:1 Probable Genotypes of Parents: Grain color is one trait. Grain texture is...
Say we have a continuous random variable X with density f(x) = c (1+x3) (where c...
Say we have a continuous random variable X with density f(x) = c (1+x3) (where c is a constant) with support Sx = [0,3] a. What value of c will make f(x) a valid probability density function? b. What is the probability that X=2? What is the probability that X is greater than 2? Now say we have an infinite sequence of independent random variables Xi (that is to say X1, X2, X3, ....)  with density f(x) stated earlier. c. What...
Say I have and Array so MyArray starts off as S A Q W A R...
Say I have and Array so MyArray starts off as S A Q W A R .... I want to sort the Array alphabetically using ascii codes to sort. However in Ascii code capital letters come first and then lower case letters are sorted after. My goal is to not only sort the array, but also make lowercase sorted in its proper place. I am using visual basics and I cant use a built in sorter that does it the...
Hi, I have a question. The paper say, " The video "Bigger than Enron" 's states...
Hi, I have a question. The paper say, " The video "Bigger than Enron" 's states Enron's collapse was more than the story of just one company. What does this statement mean? How-far reaching are the implications of a corporate fraud of this magnitude? Please provide examples of inured parties and explain how they are affected." ?I understand the first question saying that Enron's scandal affect a lot of business. But I don't know understand the rest of the question....
Say we have a continuous random variable X with density function f(x)=c(1+x3) (where c is a...
Say we have a continuous random variable X with density function f(x)=c(1+x3) (where c is a constant)with support SX =[0,3]. a.) What value of c will make f(x) a valid probability density function. b. )What is the probability that X=2? What is the probability that X is greater than 2? Now say we have an infinite sequence of independent random variables Xi (that is to say X1, X2, X3, ....) with density f(x) stated earlier. c. What is the probability...
Using C programming I have a file that contains earthquake data that I will copy and...
Using C programming I have a file that contains earthquake data that I will copy and paste below. I want to use either bubble or insertion sort to sort the file by latitude in ascending order, then create a new file containing the sorted data. example file to sort: time,latitude,longitude,depth,mag,magType,nst,gap,dmin,rms,net 2020-10-17T17:22:03.840Z,32.877,-116.2991667,0.31,1.16,ml,21,119,0.07747,0.26,ci 2020-10-17T17:17:29.980Z,34.1611667,-116.452,2.75,0.87,ml,17,66,0.05224,0.22,ci 2020-10-17T17:03:54.460Z,33.5396667,-116.4613333,8.66,0.63,ml,18,126,0.06084,0.16,ci 2020-10-17T16:55:01.080Z,63.254,-151.5232,8,1.4,ml,,,,0.9,ak
The data set is height in inches and weight in pounds of random patients at the...
The data set is height in inches and weight in pounds of random patients at the Dr's office. Predict the weight of a patient that is 67 inches tall. Is it possible to predict using linear regression? Support your answer Linear regression was completed with the following results: Equation: Weight = -281.847 + 6.335*Height p-value = 0.00161 Height Weight 68 148 69 126 66 145 70 158 66 140 68 126 64 120 66 119 70 182 62 127 68...
Consider the following data. I/S 2015 2016 Sales (S) 1,200 1,320 (+10%) - Costs (C) (COGS...
Consider the following data. I/S 2015 2016 Sales (S) 1,200 1,320 (+10%) - Costs (C) (COGS &  SG&A) 1,000 = EBITDA (=EBIT) 200 - Interest 20 =EBT 180 - Tax (T) 40 =      NI 140 Dividend 40 Plowback 100 B/S Assets (A) 2,000 Debt (D) 800 Equity (E) 1,200 Common stock (CS)            800 Retained earnings (RE)                 400(+100) From these data, calculate the following ratios, showing all work: Margin (Cost) = Turnover (TO) = Interest Rate = Tax Rate = Leverage = Assume...
Data from 4.10: Multiple Comparisons Dependent Variable:   DyeStrength Tukey HSD (I) Color (J) Color Mean Difference...
Data from 4.10: Multiple Comparisons Dependent Variable:   DyeStrength Tukey HSD (I) Color (J) Color Mean Difference (I-J) Std. Error Sig. 95% Confidence Interval Lower Bound Upper Bound Blue Green 35.200* 1.661 .000 31.08 39.32 Yellow 20.700* 1.661 .000 16.58 24.82 Green Blue -35.200* 1.661 .000 -39.32 -31.08 Yellow -14.500* 1.661 .000 -18.62 -10.38 Yellow Blue -20.700* 1.661 .000 -24.82 -16.58 Green 14.500* 1.661 .000 10.38 18.62 *. The mean difference is significant at the 0.05 level. DyeStrength Tukey HSDa Color...
I have some data from a random sample of 343 students who are taking statistics at...
I have some data from a random sample of 343 students who are taking statistics at a particular college. For each student, gender is recorded along with their GPA. The mean GPA for the 182 males in the sample is 3.283. The mean GPA for the 161 females in the sample is 3.092. We wish to estimate the difference in the mean GPA’s for all males and females who take statistics at this college. The standard error of the relevant...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT