Re: [R] glm - rgamma vector as predictor
Wim Kreinen gmail.com> writes: > [snip] > > Actually, I started with rgamma to generate some random vectors because I > wanted to play around with various conditions (and become familiar with > gamma shape). But before you can start with gamma shape you need to have a > glm object. > > Assuming > > gamma.random <- rgamma (1000,1.5) > > is my random vector. > > How do I create a glm object if I only have one vector? I guess, my random > vector is the predictor and the response is the probability (in the sense > of a pdf). Can anybody give me a hint how the syntax is? [snip] I think you're looking for MASS::gamma.shape(glm(gamma.random ~ 1, family=Gamma)) __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] glm - rgamma vector as predictor
I have a strange question concerning the fit of a Gamma generalized linear model with glm (and further using gamma.shape to measure the shape parameter). Actually, I started with rgamma to generate some random vectors because I wanted to play around with various conditions (and become familiar with gamma shape). But before you can start with gamma shape you need to have a glm object. Assuming gamma.random <- rgamma (1000,1.5) is my random vector. How do I create a glm object if I only have one vector? I guess, my random vector is the predictor and the response is the probability (in the sense of a pdf). Can anybody give me a hint how the syntax is? glm (? ~ gamma.random, family=Gamma) Thanks Wim [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.