0

I am currently trying to fit a linear model to count data, where the errors are following a poisson distribution. Namely I would like to minimize the following enter image description here

where I have i samples. β is a vector with m coefficients and x is consisting of m independent (explanatory) variables. β should sum up to 1 and each coefficient should be larger than 0.

I am using R and I tried the package glmc without much success. The only example in the documentation is only confusing me, as I don't get how the constraint matrix Amat is enforcing a constraint on the coefficients. Is there any other example I could have a look at or another package? I also tried solving this analytically with medium success. Any help is appreciated!

kind regards, Lena

  • Please create a [minimal reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), with sample data, code and expected output. – emilliman5 Jan 30 '18 at 16:19
  • If you need basic help with Poisson Regression in R and some examples please try here... https://stats.idre.ucla.edu/r/dae/poisson-regression/ – Chuck P Jan 30 '18 at 17:09
  • Hi everybody I solved it using constrOptim which is much better documented, so I could implement the constraints correctly – user3805780 Jan 31 '18 at 17:18

0 Answers0