[R] Structural equation models (SEM) for count data / poisson distribution

John Fox jfox at mcmaster.ca
Wed Aug 7 12:36:37 CEST 2013


Dear Stella,

The sem package doesn't make provision for count data. Because the sem() function allows the user to specify an arbitrary objective function, if you know the likelihood for the model that you want to fit, you could in principle write a corresponding objective function, but this would be a nontrivial task. 

Another approach might be to use the multinormal likelihood along with robust standard errors after transforming the counts by, say, a square-root transformation, but this isn't promising if there are many 0 counts.

I hope this helps,
 John

On Tue, 06 Aug 2013 09:51:56 -0700
 Stella Copeland <scopeland at ucdavis.edu> wrote:
> Dear R community,
> 
> I am constructing structural equation models in R and I have tried both the sem and lavaan packages. I have count data (numbers of plants in this case) that I would like to use as an endogenous variable. The poisson distribution seems appropriate for these data, but I can't seem to figure out how best to handle this within either package, lavaan or sem, though I have noticed that both packages are adding lots of options/capability to their core sem functions, so perhaps I have missed something.
> 
> Could someone recommend a reasonable approach for handling count data with SEM in R, in either lavaan or sem?
> 
> Thanks in advance for comments and suggestions,
> Stella
> 
> -- 
> Stella Copeland
> PhD Candidate
> Environmental Science & Policy
> UC Davis
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list