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 wou
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 s
Regards,
John
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On
> Behalf Of Jarrett Byrnes
> Sent: December-15-09 5:07 PM
> To: r-help@r-project.org
> Subject: Re: [R] Structural Equation Models(SEM)
>
> Joerg Everm
Joerg Everman has a great solution to this. He changed the middle of
the sem.mod code to include a variable, fit, and then used the
following approach around where you define the objectives:
if (fit=="ml") {
objective.1 <- function(par){
A <- P <- matrix(0, m, m)
val
Thank you Jeremy for your information.
The world is changing though. We live in an
increasing economic pressure. One symptom is that
we are forced to use smaller samples for economy.
This explains the interest for research in how the
methods perform on small samples. The cited
large simulation s
Indeed, looking at sem.R in the package, we see that at the heart of
sem is a version of the maximum likelihood discrepancy function. It
should be easy to use, say, another flag (e.g. set the default to
method="ML" for the current behavior) and for other methods, use
different discrepancy
In the world of SEM, GLS has pretty much fallen by the wayside - I
can't recall anything I've seen arguing for it's use in the past 10
years, and I also can't recall anyone using it over ML. The
recommendations for non-normal distributions tend to be robust-ML, or
robust weighted least squares.
Hi R-colleagues.
I have been using the sem(sem) function. It uses
maximum likelyhood as optimizing. method.
According to simulation study in UmeƄ Sweden
(http://www.stat.umu.se/kursweb/vt07/stad04mom3/?download=UlfHolmberg.pdf
Sorry it is in swedish, except the abstract)
maximum likelihood is OK
Ralf,
If you are representing this as a factor model, you need to have
the factors lead to the variables:
model.RLIM <- specify.model()
f1 -> R , laddR, NA
f1 -> L, laddL, NA
f1 -> I, laddI, NA
f1 -> M, laddM, NA
R <-> R, dR,NA
L <-> L, dL,NA
I <->
he Netherlands Debyeplein 1 (Randwyck)
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Ralf Finne [ralf.fi...@novia.fi]
Sent: Wednesday, November 25, 2009 5:23 PM
To: r-help@r-project.org
Subject: [R] Structural Equation Models(SEM)
Hi R-colleagues.
In
Hi R-colleagues.
In the sem-package
i have a problem to introduce hidden variables.
As a simple example I take an ordinary factor analysis.
The program:
cmat=c(0.14855886, 0.05774635, 0.08003300, 0.04900990,
0.05774635, 0.18042029, 0.11213013, 0.03752475,
0.08003300, 0.11213013,
11 matches
Mail list logo