[R] glm - rgamma vector as predictor
Wim Kreinen
wkreinen at gmail.com
Wed Oct 8 13:02:50 CEST 2014
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]]
More information about the R-help
mailing list