[R] glm - rgamma vector as predictor
Ben Bolker
bbolker at gmail.com
Wed Oct 8 22:24:55 CEST 2014
Wim Kreinen <wkreinen <at> 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))
More information about the R-help
mailing list