Hello! I'm a graduate student in ecology with a terrible statistics background. Your videos are incredibly intuitive and make statistics less of a black box. Thanks so much for sharing your knowledge!
but this video isn't teaching the deepth of GLM, it didn't explain the methods applied for the regression adjust over the link function, the IRLS algorithm for example
I’m an actuary too haha. Except I’m not working with GLMs because I’m at a start up commercial lines carrier and we aren’t too sophisticated yet. It would be nice to actually see the material I learned on p, MAS I, and II in practice!
This is the best video I have ever watched on the Internet. Thank you so much for sharing your insights with the research community. God bless you, sir!!!
Honestly, thank you so much for this explanation!! It's super super helpful to have someone actually explain the different types of glm's in a easy to understand way. I had not idea what they were nor when to use them, and now I don't have to keep bashing my head against a wall trying to understand the world of statistics :)
Great explanation on the GLMs. It gave me some new insights for sure. May you keep growing! Thanks for the video. I guess I'm gonna land at your channel quite often :)
I use a generalization of Poisson regression called inhomogenous Poisson point process regression. It is useful for modelling arrivals of discrete units into a system over time.
Amazing video, just understood GLM's, of course after not understanding with books and web pages. I was assigned to teach this topic in class and you just saved the day. Thank you Dustin!
The negative binomial distribution is obtained by the compound distribution of a Poisson distribution with Gamma-distributed inter-arrival times. It generalizes the Poisson distribution to have over-dispersion (i.e. the mean being less than the variance). The negative binomial cannot give underdispersion where the variance is less than the mean, but this can be achieved using the generalized Poisson distribution.
Quick question for you, if you're still checking these comments! When taking the next step and moving up to GLMMs because of the requirements of data structure, is it a necessity to still use a link function in your code? Thanks, love your videos
Thank you so much for your videos- I'm so grateful for the explanations, and feel they've been clarifying sticking points for me left and right! Question: A sticking point I'm still struggling through is the relationship between the shape of your data, the shape of your residuals, and what this means for your choices in building a GLM. 1- You mention that if your data isn't normal, you should use a GLM. If it's the residuals that really matter here, is that because if your data isn't normal your residuals are likely also not normal? 2. following up on the above- if your data are not normal, but your residuals are normal- does that mean you can just proceed with the model you've got as is? Or might you still run into problems? 3. Are normal residuals a sign of you having a decent model fit? So if they aren't normal, this is a sign you should use a GLM...for a better fit? And when having done so...do your residuals hopefully become normal as a result? In other words- does a GLM "fix" your model to give you normal residuals -or- does a GLM handle non-normal residuals such that it gives accurate estimates of for e.g. "95% confidence" for a non-normal distribution that fits your residuals? Hope those questions even make sense, and thank you so much again!!! I teach and know how much work it takes to put together things like this and answer so many questions- grateful for your time!
Man this video was great. I do get the excitement for GLMs tho, i actually got significant results using that and not a student T as suggested by my tutor.
The video plots a density for a Poisson distribution, but a Poisson distribution is discrete. Thus such a density plot is just a rough approximation of the probability mass function of a Poisson distribution.
@@qwerty11111122 I might not be understanding what you mean by "kink". If by "kink" we mean a discontinuity, then you should consider the counterexample found in the Laplace distribution. The density function of a Laplace distribution is non-smooth at its mode, which also for this distribution equals the median and mean. Even though it isn't smooth everywhere (it has a "kink"), is it not a discrete probability distribution. Fortunately a weak derivative exists at this point even though ordinary derivatives do not, so many of the same results can be obtained almost-surely (i.e. up to a set of measure zero).
The link function is applied to y, so you get f(y) = systematic component, that why you apply your systematic component to the inverse of the link function. Note that for id and 1/x, the link function is its own inverse that's why you only spotted it for Poisson
The residuals from the conditional mean from a gamma generalized linear model will not be gamma-distributed. A quick way to confirm this is to realize that the outcome variable is sometimes less than the predicted mean value, resulting in a negative residual. But a gamma distribution has non-negative support, and therefore cannot be the distribution of the residuals. In general the residuals do not follow the same distribution as the likelihood.
Alright, let me comment on your video! The moment I started the video, the first few seconds I thought I wouldn't be able to make it to the end of the video, may be because the way you spoke (its not your problem, but mine. I am little too sensitive and can't bear loud noise. My sincere apology for writing this) BUT, after a minute, my brain started enjoying it because of the simplicity in your explanation, your deep knowledge of the subject and your power to connect with your students (people watching this video). I am so grateful to you 🙏😊 (subscribed, clicked on the bell icon, and going to be regular visitor to your channel 😄)
I love your craziness, and you are doing us a great service. Going forward, I’m going to scream “Generalised Linear Model!!!” At people who need it. Can you do a full course on GLM, the math behind it and I guess any other regression analysis theory. I think that would be awesome, or if you have already done this I couldn’t find it 🙁
I was surprised at how complex problems can be solved with a simple two-layer feedforward binary classification neural network. With a single hidden layer with a ReLU activation function, followed by an output layer with a sigmoid activation, it is able to learn very complex binary classifications (Such as learning financial signals). Unfortunately, I did not see any tutorials on financial data modeling using linear layers - most are using CNN, LSTM, and GRU model types. Those model types just don't seem to learn my dataset as well as this two-layer feedforward binary classification neural network does. Fun topic!
Thank you for the video and all the work behind! You really made a complicated topic (at least in my head) look very easy. Two questions I'd appreciate if you could reply: 1. When checking whether to use gaussian or gamma GLMM, should I check distributions of the original data or of the residuals? (I often see people checking the original data while it is often said we should check the residuals) 2. Can I blindly trust AIC or BIC to quickly determine whether to use gaussian or gamma GLMM? i.e., without needing to plot the data. Thanks in advance!
Thank you very much for the vide. It's very helpful. However I have few questions. 1. How do I find out if my data follows gaussian or gamma? I did Shapiro Wilk test to check for normality and it is not normal. But I am not sure if they follow gamma distribution. 2. How does the prediction change based on the family and link function? Suppose I have the same gamma distribution but have different link functions, how will it affect the model fitness? Or rather how can I choose the link function? 3. Is there any method to check the goodness of fit?
its a great video, thank you. but can i ask you some question, if i use poisson with 2 predictors, can i make it into plot diagram? sorry for my bad english, im from indonesia
So say I had one predictor variable, weeks, and one dependent variable, counts. When I plot x vs y there is a clear quadratic relationship. So should I use a sqrt link function in the poisson or negative binomial model that I end up running?
Great video I have a question about the inverse link 1/x if you use the R default for Gamma. Is it right that interpreting the coefficients you switch the relationship so if the coefficient is -0.8 this is actually a positive relationship not negative?
Excelent video, first time I saw it I though you were really really annoying with your voice and impressions, but the second time I watch it I got really clarified :) But still, I have a question: when we use OLS, we assume that our residuals must follow a normal distribution and if they don't, we can either try to find a better model (more variables, transformations, whatever) or switch the model from a Linear Regression to, let's say, a Poisson Regression (GLM of Poisson Family). But my doubt is this: is there any chance that our residuals will not resemble a poisson distribution and it's our coefficients that get crazy or, on the other hand, we might fit good coeficients with nice p-values, but our residuals will not follow a poisson distribution, but a normal distribution..? I don't know how clear I got with this question, but I guessing my doubt is related with how can I validate that my poisson fit is actually the best model to be fitted, given the p-values and the residual distribution? Kind Regards, you are the best
can we just rebel all over the worlds and shout out: "we need our teachers/professors to be LIKE THISSSSSSS!!!!!!". we need instructors who make things make sense to us, not a parrot that re-read the textbooks/slides!
Hello! I'm a graduate student in ecology with a terrible statistics background. Your videos are incredibly intuitive and make statistics less of a black box. Thanks so much for sharing your knowledge!
Thank you!!!
That introduction though 😂 I have never seen someone so excited to be asked about GLMs.
I've encountered GLMs for years, this was the best explanation I've ever seen. Well done and thank you for your service! 👏🙇♂️
I spent hours and hours trying to understand GLM from text books and still came out confused. Your 20 mins video cleared everything up. THANK YOU!
but this video isn't teaching the deepth of GLM, it didn't explain the methods applied for the regression adjust over the link function, the IRLS algorithm for example
You are a fabulous professor, ur students are lucky
I'm an actuary and we work with GLMs every day! Great explanation.
I’m an actuary too haha. Except I’m not working with GLMs because I’m at a start up commercial lines carrier and we aren’t too sophisticated yet. It would be nice to actually see the material I learned on p, MAS I, and II in practice!
You are so good at keeping up attention, which i think is so important for people teaching! Keep up the good work!
You are awesome. It takes only a few minutes to let me understand why GLM is so important. Love your lecture.
This is the best video I have ever watched on the Internet. Thank you so much for sharing your insights with the research community. God bless you, sir!!!
Seriously good, you are demystifying many issues I have struggled to understand
why am I just NOW finding you. love the style! 2:20 is my style.
i wish every professor was like you. how you kept my attention was amazing.
Thanks! 😃
Honestly the best content on TH-cam
this is true!!
Honestly, thank you so much for this explanation!! It's super super helpful to have someone actually explain the different types of glm's in a easy to understand way. I had not idea what they were nor when to use them, and now I don't have to keep bashing my head against a wall trying to understand the world of statistics :)
Thank you for the brief but clear explanation about different "distributions".
Extremely helpful video ! Thank you for your clear explanations
Great video. One remark: At 9:55 the link function of linear regression is not 1, it is identity function f(x) = x
Great explanation on the GLMs. It gave me some new insights for sure. May you keep growing! Thanks for the video. I guess I'm gonna land at your channel quite often :)
Your value is more than your appearance
You are amazing.
Thanks for rapping me to the point of the truth regarding GLM
Finally, a channel that speaks sensibly!
We're an endangered species.
It’s so much fun and informative to listen to you. And you were are talking about general linear models.
Love love your presentation. Good way to engage people
Thanks!
You are great! And I love music in the background, gives a crazy feeling which eases up information for some reason.
Very straightforward explanation of the link function! Thank you
Glad it was helpful!
You first spoke of data being normally distributed and then residuals being normally distributed. Could you please distinguish between the two?
I use a generalization of Poisson regression called inhomogenous Poisson point process regression. It is useful for modelling arrivals of discrete units into a system over time.
Amazing video, just understood GLM's, of course after not understanding with books and web pages. I was assigned to teach this topic in class and you just saved the day. Thank you Dustin!
Man u are an amazing teacher
Your work is appreciated, Thank you very much!!
Guy! You're amazing. Good job!
Amazing video thanks
The negative binomial distribution is obtained by the compound distribution of a Poisson distribution with Gamma-distributed inter-arrival times. It generalizes the Poisson distribution to have over-dispersion (i.e. the mean being less than the variance). The negative binomial cannot give underdispersion where the variance is less than the mean, but this can be achieved using the generalized Poisson distribution.
This is what I always need, someone explaining things with some fun and at the same time in dummie terms xd
Thanks so much for these videos! You're an amazing teacher.
This is the most helpful video I've ever found
Really great video, thanks
Thank you, I loved this, I was smiling during the whole video and - most importantly - understood what generalized linear models are about!
Great explanation, it put so many things I had in mind in the right order. Sub. Thank you!
Quick question for you, if you're still checking these comments! When taking the next step and moving up to GLMMs because of the requirements of data structure, is it a necessity to still use a link function in your code? Thanks, love your videos
your videos are brilliant, thank you so much
I cannot believe that you have only 3.7 k subscribers.
Amazing hahaha it helped me more than I expected. Thanks
Great video! May I suggest that a short blog post to summarise this content will be very helpful as well!
Wow. Fun. Thanks learned a lot without getting bored
Glad you enjoyed it!
Thank you so much for your videos- I'm so grateful for the explanations, and feel they've been clarifying sticking points for me left and right!
Question: A sticking point I'm still struggling through is the relationship between the shape of your data, the shape of your residuals, and what this means for your choices in building a GLM.
1- You mention that if your data isn't normal, you should use a GLM. If it's the residuals that really matter here, is that because if your data isn't normal your residuals are likely also not normal?
2. following up on the above- if your data are not normal, but your residuals are normal- does that mean you can just proceed with the model you've got as is? Or might you still run into problems?
3. Are normal residuals a sign of you having a decent model fit? So if they aren't normal, this is a sign you should use a GLM...for a better fit? And when having done so...do your residuals hopefully become normal as a result? In other words- does a GLM "fix" your model to give you normal residuals -or- does a GLM handle non-normal residuals such that it gives accurate estimates of for e.g. "95% confidence" for a non-normal distribution that fits your residuals?
Hope those questions even make sense, and thank you so much again!!! I teach and know how much work it takes to put together things like this and answer so many questions- grateful for your time!
Thanks for your explanation! If you have some examples how to apply them, it would be extremly helpful! Thanks a lot.
Thank you for your work, your videos are great. :)
amazing vid, thank you so much, subscribed
Man this video was great. I do get the excitement for GLMs tho, i actually got significant results using that and not a student T as suggested by my tutor.
This is was very nice, had a nice laugh but very educational too, lmao
Very clearly explained!! Thank you sir
This was great
The video plots a density for a Poisson distribution, but a Poisson distribution is discrete. Thus such a density plot is just a rough approximation of the probability mass function of a Poisson distribution.
The plot is kinked, so it is discrete. But he def should have made a histogram instead
@@qwerty11111122 I might not be understanding what you mean by "kink".
If by "kink" we mean a discontinuity, then you should consider the counterexample found in the Laplace distribution. The density function of a Laplace distribution is non-smooth at its mode, which also for this distribution equals the median and mean. Even though it isn't smooth everywhere (it has a "kink"), is it not a discrete probability distribution. Fortunately a weak derivative exists at this point even though ordinary derivatives do not, so many of the same results can be obtained almost-surely (i.e. up to a set of measure zero).
Thank you from Nepal
Great stuff as usual. Keep up.
Thanks!
In 12:10 it says log, but the systematic components seem to be exponentiated. Which one is correct?
The link function is applied to y, so you get f(y) = systematic component, that why you apply your systematic component to the inverse of the link function. Note that for id and 1/x, the link function is its own inverse that's why you only spotted it for Poisson
@@RomainPuech Thanks, I got it now!
The residuals from the conditional mean from a gamma generalized linear model will not be gamma-distributed. A quick way to confirm this is to realize that the outcome variable is sometimes less than the predicted mean value, resulting in a negative residual. But a gamma distribution has non-negative support, and therefore cannot be the distribution of the residuals. In general the residuals do not follow the same distribution as the likelihood.
Really well explained
Thank you!
Thank you for the video! The explanation is clear.
Thanks you and I’m waiting for gamma distribution example will be useful in my resurch
Alright, let me comment on your video!
The moment I started the video, the first few seconds I thought I wouldn't be able to make it to the end of the video, may be because the way you spoke (its not your problem, but mine. I am little too sensitive and can't bear loud noise. My sincere apology for writing this)
BUT, after a minute, my brain started enjoying it because of the simplicity in your explanation, your deep knowledge of the subject and your power to connect with your students (people watching this video).
I am so grateful to you 🙏😊
(subscribed, clicked on the bell icon, and going to be regular visitor to your channel 😄)
very concise video
very.
concise
This was so great, thanks!!
this was amazing! thank you :)
You're a legend, thanks a lot
I love your craziness, and you are doing us a great service. Going forward, I’m going to scream “Generalised Linear Model!!!” At people who need it.
Can you do a full course on GLM, the math behind it and I guess any other regression analysis theory. I think that would be awesome, or if you have already done this I couldn’t find it 🙁
I have a couple playlists related to what you're asking for. I tend not to get mathy (because it scares my students :))
What an interesting host who are full of statistics.
Bravo, sir.
Thanks a lot man
How does one actually test for significance with these models?
First 100K views. Congrats! Keep it on.
Thanks!
难以置信的好视频!我能够感觉到他是真的懂
So can we conclude that "tobit models, truncated models, and the heckmann model( tobit II model) follow a Gamma distribution?
How about inverse binomial and tweedie distribution? Can you make a video?
thank you so much for your videos, greeting froms mexico
Are link functions a special case of activation functions (in the context of NNs)?
I was surprised at how complex problems can be solved with a simple two-layer feedforward binary classification neural network. With a single hidden layer with a ReLU activation function, followed by an output layer with a sigmoid activation, it is able to learn very complex binary classifications (Such as learning financial signals). Unfortunately, I did not see any tutorials on financial data modeling using linear layers - most are using CNN, LSTM, and GRU model types. Those model types just don't seem to learn my dataset as well as this two-layer feedforward binary classification neural network does.
Fun topic!
i love this video so much
i love this teacher
Thank you, this is excellent. I did find the music distracting, however. :)
GLMM video? & Beta distribution please
I do have a GLMM video somewhere. I think I also did a beta video.
Great Video!!!!
“No one uses these models”
Cries in ecologist
Thank you so much!
Do you teach at Rowan University in New Jersey?
Not me giggling about your "Poisson" pronunciation in my office. Didn't know GLMs could be so funny.
the links to the graduate and undergraduate playlists are broken could you please Post them in a comment
Thank you for the video and all the work behind! You really made a complicated topic (at least in my head) look very easy. Two questions I'd appreciate if you could reply:
1. When checking whether to use gaussian or gamma GLMM, should I check distributions of the original data or of the residuals? (I often see people checking the original data while it is often said we should check the residuals)
2. Can I blindly trust AIC or BIC to quickly determine whether to use gaussian or gamma GLMM? i.e., without needing to plot the data.
Thanks in advance!
1- You are right. We look at the *residuals*.
2-I wouldn't trust anything without plotting the data :)
@@QuantPsych To clarify #1, is that the residuals of a linear regression fit?
Thank you very much for the vide. It's very helpful. However I have few questions.
1. How do I find out if my data follows gaussian or gamma? I did Shapiro Wilk test to check for normality and it is not normal. But I am not sure if they follow gamma distribution.
2. How does the prediction change based on the family and link function? Suppose I have the same gamma distribution but have different link functions, how will it affect the model fitness? Or rather how can I choose the link function?
3. Is there any method to check the goodness of fit?
its a great video, thank you. but can i ask you some question, if i use poisson with 2 predictors, can i make it into plot diagram? sorry for my bad english, im from indonesia
With flexplot you can.
So say I had one predictor variable, weeks, and one dependent variable, counts. When I plot x vs y there is a clear quadratic relationship. So should I use a sqrt link function in the poisson or negative binomial model that I end up running?
Makes sense to me. Maybe try both the log link and a sqrt link and see if it actually fits better.
Great video I have a question about the inverse link 1/x if you use the R default for Gamma. Is it right that interpreting the coefficients you switch the relationship so if the coefficient is -0.8 this is actually a positive relationship not negative?
Correct.
What happens if you have a mixture of variable types. Continous, discrete etc.
Fit a mixture model. I haven't used them often, except for zero-inflated models.
Good Video
Thank you. Clear explanation. Can we use GLM when observations are dependent or correlated? Or is it a situation where GLMs not applicable?
You cannot. You'll have to use mixed models (or time-series models).
What is the "E" he is referring to when talking about difference between transformation and link function at 10.50 min?
Error term
Omg! I wish I was in your class
Excelent video, first time I saw it I though you were really really annoying with your voice and impressions, but the second time I watch it I got really clarified :) But still, I have a question: when we use OLS, we assume that our residuals must follow a normal distribution and if they don't, we can either try to find a better model (more variables, transformations, whatever) or switch the model from a Linear Regression to, let's say, a Poisson Regression (GLM of Poisson Family). But my doubt is this: is there any chance that our residuals will not resemble a poisson distribution and it's our coefficients that get crazy or, on the other hand, we might fit good coeficients with nice p-values, but our residuals will not follow a poisson distribution, but a normal distribution..? I don't know how clear I got with this question, but I guessing my doubt is related with how can I validate that my poisson fit is actually the best model to be fitted, given the p-values and the residual distribution?
Kind Regards, you are the best
can we just rebel all over the worlds and shout out: "we need our teachers/professors to be LIKE THISSSSSSS!!!!!!". we need instructors who make things make sense to us, not a parrot that re-read the textbooks/slides!
I’m afraid that this mostly works for other people with ADHD