Question
Really short question! Please help me to solve, thank you!
(30%)Q2 (Poisson regression): We collected n 15 independent count observations {Vi : 1,..., 15 and their corresponding covariates (i 1,..., 15). Assume the relationship between Vi and xỉ (for i-: 1, , 15) is yi ~ Poisson(A) and log(A) α+ßxi. Please 1) write down the likelihood function L(a, B|x, y) of the Poisson regression model; 2) derive the Newton method for maxmizing L(a, BIx, y); 3) implement the Newton method using R to get MLE of (α, β) i -0.30 0.32 0.41 0.62 -0.21 0.31 0.41 0.81 i 2 2 10 1 22 0 6 9 34 0.50 -0.21 -0.20 0.70 0.10 0.13 0.69 5 0 21 3 2 29
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here given that dependent (response) variable is Y, and we collected data n=15 with their corresponding independent variable X. Given that,

yi ~ Poisson (lambda _{i}) ...... i = 1, 2, ........... 15

And Log(lambda _{i})=alpha + eta x_{i}

1) Let Likelihood function of the Poisson Regression model is as

Lla, β.yi) yi

= prod_{i=1}^{n} rac {e^{-e^{alpha + eta x_{i}}} [e^{alpha+eta x_{i}}]^{y_{i}}}{y_{i}!}

The Log Likelihood function is as

l(alpha, eta ; y_{i})= -sum_{i=1}^{n}e^{alpha + eta x_{i}}+ sum_{i=1}^{n} y_{i}(alpha+eta x_{i}) - sum_{i=1}^{n}log(y_{i}!)

2) The first order condition for a maximum is

rac{d}{dlambda}l(lambda; x_{1},......, x_{n}) = 0

The first derivative of the log-likelihood with respect to the parameter lambda is

rac{d}{dlambda}l(lambda; x_{1},......, x_{n}) = rac{d}{dlambda} (-nlambda - sum_{j=1}^{n}ln(x_{j}!) + ln(lambda)sum_{j=1}^{n}x_{j})

=-n + rac{1}{lambda}sum_{j=1}^{n}x_{j}

Impose that the first derivative be equal to zero, and get

lambda =rac{1}{n}sum_{j=1}^{n}x_{j}

3) By using R get MLE as

R RGui (64-bit) File Edit View Misc Packages Windows Help R R Console citation ) on how to cite R or R packages in publications. Type demo () for some demos, help )for on-line help, or help.start )for an HTML browser interface to help. Type to quit R. [Previously saved workspace restored] x <-c(-0.30, 0.32, 0.41, 0.62, -0.21, 0.31, 0.41, 0.81, 0.50, -0.21, -0.20, $ > y<-c(2, 10, 11, 22, 0, 6, 9, 34, 5, 0, 1, 21, 3, 2, 29) >p_data <- data.frame (y,x) >p glm <- glm (yx, family-poisson, data-p data) >summary (p glm) Call: glm (formula = y ~ x, family = poisson, data -p data) Deviance Residuals: Min 10 Mediar 30 Max -2.31138 -0.74186 -0.01253 0.75646 1.31923 Coefficients: Intercept) -7209 3.5419 Estimate Std. Error z value Pr (>Iz|) 0.2264 3.183 0.00146 0.3590 9.866 < 2e-16 Signif. codes: 0*0.001 **O.01 0.05. 0.11 (Dispersion parameter for poisson family taken to be 1) Null deviance 163.093 on 14 degrees of freedom Residual deviance: 16.065 on 13 degrees of freedom AIC: 70.291 Number of Fisher Scoring iterations: 5

Here we get the value as

alpha = 0.7209 and eta= 3.5419

So the model is as

y = 0.7209 + 3.5419*x

Add a comment
Know the answer?
Add Answer to:
Really short question! Please help me to solve, thank you! (30%)Q2 (Poisson regression): We collected n...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Really short question! Please help me to solve, thank you! (10%)Q3 (Logistic regression): We collected n...

    Really short question! Please help me to solve, thank you! (10%)Q3 (Logistic regression): We collected n 15 independent binary observations : i- 1, , 15) and their corresponding covariates {xi : і = 1, , 15). Assume the relationship between yi and zi (for i = 1, , 15) is Vi ~ Bernoulli(p.) and logit(Pi)-α+82i, where logit(t) = log ti. Please 1) write down the likelihood function L(a, B|x, y) of the logistic regression model; 2) derive the Newton method...

  • Really short question! Please help me to solve, thank you! Yet, the data set is too...

    Really short question! Please help me to solve, thank you! Yet, the data set is too big (n=8000) as I can’t show all of them. Hope that the information of the second picture would be helpful. (30%)Q4 (EM algorithm): The heights of n 8000 students are drawn from a school. Assume the height largely depends on the gender. We denote the height of student i by Yi, and the gender of student i by Z..(Y; : 1 i n) are...

  • Really short question! The second picture is some information about the data set. Please help me...

    Really short question! The second picture is some information about the data set. Please help me to solve, thank you! (30%)Q4 (EM algorithm): The heights of n 8000 students are drawn from a school. Assume the height largely depends on the gender. We denote the height of student i by Yi, and the gender of student i by Z..(Y; : 1 i n) are observed, but {Zi : 1 i n} are unknown Our model can be formulated as follows....

  • Really short question! Please help me to solve part(b), also need the R code, thank you!...

    Really short question! Please help me to solve part(b), also need the R code, thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ μο. a/2 where φ(.)Is the CDF of N(0,1), d-layo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact that φ(x) [pdf of N(0,1)] is a decreasing function in x when x> 0,...

  • Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem...

    Really short question! Please help me to solve ONLY part(b) with R code. Thank you! Problem 4 [26 points] (Section 2.4): Consider a one-sample z-test (known variance) with hypotheses: Ho: μ lo vs H, μ *Ho. The probability of Type II error can be written in the form |ß D(%2_Jnd)-0(-%2_Jnd) where Φ㈠ is the CDF of N(0,1), d Isyo, and δ is the difference between the true mean and the mean under Ho (a) [10 points] Based on the fact...

  • Please help to solve that question very appreciate if you can help me to solve all the part...

    please help to solve that question very appreciate if you can help me to solve all the part as my due date coming soon but got stuck in this question. Consider two separate linear regression models and For concreteness, assume that the vector yi contains observations on the wealth ofn randomly selected individuals in Australia and y2 contains observations on the wealth of n randomly selected individuals in New Zealand. The matrix Xi contains n observations on ki explanatory variables...

  • PLEASE HELP ME OUT WITH BOTH PICTURES & HIGHLIGHT ANSWERS PLEASEE AND THANK YOU! M N...

    PLEASE HELP ME OUT WITH BOTH PICTURES & HIGHLIGHT ANSWERS PLEASEE AND THANK YOU! M N o 1 T(K) 2 1/1 200 730 3 4 760 5 KM's Ink 0.011 0.005 0.105 0.343 0.789 2.17 20 145 790 810 840 Missing any of the following items will result in 5 pts deduction a) In the excel spread sheet, calculate the values for Ink and 1/T in K, convert to Kif needed) in the corresponding columns highlighted in yellow. b) Plot...

  • Please help me solve this question using Excel data!! (attached on bottom) Thank you!!! Question 2...

    Please help me solve this question using Excel data!! (attached on bottom) Thank you!!! Question 2 5 pts Continuing with our data visualization, create a scatterplot with the total number of check-ins (TotCheckins) on the y-axis and the average ratings (AvgRating) on the x-axis. Be sure that the equation for the trend line and the r value are shown on the scatterplot. While your plot may be different aesthetically, which of the following is an accurate representation of the data?...

  • a. What is the Sample Regression Equation? b. Which of the independent variables are significant? Why?...

    a. What is the Sample Regression Equation? b. Which of the independent variables are significant? Why? Use α = 0.10 in ALL questions. Use only the p-value to explain your answers (No need to go to tables). c. Test the overall significance of the model by relying on F Statistic. d. What is the value of adjusted r-square? e. Comment on the Normality assumption for the residuals for this model. In other word, has the normality assumption been satisfied? Explain...

  • please help me answer the all question ..thanks a lot 2. Berikut adalah keputusan penganggaran persamaan regresi untuk...

    please help me answer the all question ..thanks a lot 2. Berikut adalah keputusan penganggaran persamaan regresi untuk mengkaji penentu tekanan darah sistolik. Below is the regression output showing the results of an examination into the determinants of systolic blood pressure SUMMARY OUTPUT Regression Statistics Multiple R R Square 0.9907 0.9815 4.5467 Standard Error Observations 20 ANOVA df MS Regression Residual Total 3 17560.0464 5853.3488 330.7536 20.6721 17890.8 16 19 Coefficients Standard Error tStat 12.9037 0.5581 Intercept Xt 7.2017 2.4077...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT