Displaying 20 results from an estimated 700 matches similar to: "Help with SEM package: Error message"
2011 Mar 15
1
binary exogenous variable in path analysis in sem or lavaan
Hello all
I'm trying to run some path analysis in either sem or lavaan (preferably lavaan because I find its interface easier to use). Most of my variables are continuously distributed and fairly well-behaved but I have a single exogenous variable (sex) which is not continuously distributed. Preliminary model fitting suggests that there aren't any sex by (anything else) interactions. The
2009 May 01
1
computationally singular and lack of variance parameters in SEM
Hi all,
I am trying to set up a simple path analysis in the SEM package, but I am
having some trouble. I keep getting the following error message or
something similar with my model, and I'm not sure what I'm doing wrong:
Error in solve.default(C) :
system is computationally singular: reciprocal condition number =
2.2449e-20
In addition: Warning message:
In sem.default(ram = ram, S = S,
2011 Mar 17
2
Incorrect degrees of freedom in SEM model using lavaan
I have been trying to use lavaan (version 0.4-7) for a simple path model,
but the program seems to be computing far less degrees of freedom for my
model then it should have. I have 7 variables, which should give (7)(8)/2 =
28 covariances, and hence 28 DF. The model seems to only think I have 13
DF. The code to reproduce the problem is below. Have I done something
wrong, or is this something I
2008 May 29
1
appropriate covariance matrix for multiple nominal exogenous and multiple continuous endogenous variables in SEM
Hi,
I would like to use the sem package to perform a path analysis (no
latent variables) with a mixture of 2 nominal exogenous, 1 continuous
exogenous, and 4 continuous endogenous variables. I seek advice as to
how to calculate the appropriate covariance matrix for use with the sem
package.
I have read through the polycor package, and am confused as to the use
of "numeric" for
2008 Apr 01
1
SEM with a categorical predictor variable
Hi,
we are trying to do structural equation modelling on R. However, one of our
predictor variables is categorical (smoker/nonsmoker). Now, if we want to
run the sem() command (from the sem library), we need to specify a
covariance matrix (cov). However, Pearson's correlation does not work on the
dichotomous variable, so instead we produced a covariance matrix using the
Spearman's (or
2010 Sep 16
0
problems trying to reproduce structural equation model using the sem package
Hello,
I've been unsuccessfully trying to reproduce a sem from Grace et al.
(2010) published in Ecological Monographs:
http://www.esajournals.org/doi/pdf/10.1890/09-0464.1
The model in question is presented in Figure 8, page 81. The errors
that I've been getting are:
1. Using a correlation matrix:
res.grace <- sem(grace.model, S = grace, N = 190)
Warning message:
In sem.default(ram
2010 Oct 25
1
structural equation modeling in sem, error, The model has negative degrees of freedom = -3, and The model is almost surely misspecified...
Hi all,
I am attempting to learn my way through the sem package by constructing
a simple structural model for some of my data on bird diversity,
abundance, and primary productivity.
I have constructed a covariance matrix between these variables as per
the following:
>S_matrix = matrix(c(
>+ 0.003083259, 0, 0,
>+ 0.143870284, 89.7648490, 0,
>+ 0.276950919,
2007 Mar 07
1
No fit statistics for some models using sem
Hi,
New to both R and SEM, so this may be a very simple question. I am
trying to run a very simple path analysis using the sem package.
There are 2 exogenous (FARSCH, LOCUS10) and 2 endogenous (T_ATTENT,
RMTEST) observed variables in the model. The idea is that T_ATTENT
mediates the effect of FARSCH and LOCUS10 on RMTEST. The RAM
specification I used is
FARSCH -> T_ATTENT, y1x1, NA
2006 Aug 22
1
Total (un)standardized effects in SEM?
Hi there,
as a student sociology, I'm starting to learn about SEM. The course I
follow is based on LISREL, but I want to use the SEM-package on R
parallel to it.
Using LISREL, I found it to be very usable to be able to see the
total direct and total indirect effects (standardized and
unstandardized) in the output. Can I create these effects using R? I
know how to calculate them
2011 Mar 08
1
SEM error
Dear All,
I am new for R and SEM. I try to fit the model with Y (ordinal outcome), X
(4 categorical data), M1-M3 (continuous), and 2 covariates (Age&sex) as a
diagram.
library(polycor)
model.ly <-specify.model()
1: x -> m1, gam11, NA
2: x -> m2, gam12, NA
3: x -> m3, gam13, NA
4: age -> m1, gam14, NA
5: age -> m2, gam15, NA
6: age -> m3, gam16, NA
7: sex -> m1,
2002 Aug 13
1
Ex ante forecasting from structural equation models (SEM package)
Dear Helplist,
I want to produce forecasts from a structural equation model. With the SEM
package the model setup and its estimation is possible. However, I have not
figured out how to obtain ex ante forecasts, i.e. applying the Gauss-Seidel
algorithm to the estimated structural equations for provided values of the
exogenous variables (i.e.: y_t = -inv(A)*B*x_t).
Does anyone know if the there is
2013 Jul 22
1
Error with sem function df = -6
Hello all,
I have an issue where I am generating data and trying to confirm the
estimates using a sem. I keep getting an error about the degree of freedom
being negative "Error in sem.default(ram, S = S, N = N, raw = raw, data =
data, pattern.number = pattern.number, : The model has negative degrees of
freedom = -6"
Can someone explain this error or tell me what is wrong with my
2010 Jun 04
1
sem R: singular and Could not compute QR decomposition of Hessian
Can somebody help me with the following issue (SEM in R), please:
When I run the model (includes second order models) in R, it gives me the following:
1) In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.
2) I have aliased parameters and NaNS
or sometimes when
2006 Jul 17
1
sem: negative parameter variances
Dear Spencer and Prof. Fox,
Thank you for your replies. I'll very appreciate, if you have any ideas concerning the problem described below.
First, I'd like to describe the model in brief.
In general I consider a model with three equations.
First one is for annual GRP growth - in general it looks like:
1) GRP growth per capita = G(investment, migration, initial GRP per
2008 Jun 03
0
Summarizing dummy coefficients in sem package
Greetings,
I am working in the sem package on a model with 3 exogenous variables (2
are nominal-categorical), and 4 endogenous, continuous variables. To
use sem with the nominal variables, I created dummy variables. Now, in
my sem output I have estimates for path coefficients for the
relationship between each level of the nominal variables and the
endogenous variables they are associated
2007 Apr 09
1
Dealing with large nominal predictor in sem package
Hi,
I am using tsls function from sem package to estimate a model which includes large number of data. Among its predictors, it has a nominal data which has about 10 possible values. So I expand this parameter into 9-binary-value predictors with the coefficient of base value equals 0. I also have another continuous predictor.
The problem is that, whenever I run the tsls, I will get 'System
2006 Nov 20
1
sem package subscript out of bounds error
I'm having the most curious error while using the sem package. For
the model I'm working with, I keep getting the following error:
Error in J[cbind(1:n, observed)] <- 1 : subscript out of bounds
I''ve used debug=TRUE with sem, and there don't appear to be any
problems with model - there are no latent variables in this model.
The variables in the covariance matrix
2005 Oct 06
2
data.frame error using sem package
I keep getting this error when I try to use the sem package. I and
another person who has successfully used the sem package for similar
analysis (fMRI effective connectivity) cannot figure out what is
wrong with my code. I would appreciate any suggestions.
The error message:
Error in data.frame(object$coeff, se, z, 2 * (1 - pnorm(abs(z))),
par.code) :
arguments imply differing
2011 Feb 08
1
SEM: question regarding how standard errors are calculated
Sorry if this question has been asked previously, I searched but found
little. There also doesn't seem to be a dedicated SEM list-serv so hopefully
this will find its way to the appropriate audience.
In discussing SEM with a colleague I mentioned that a model they were
fitting in AMOS was equivalent to a linear regression and that the
coefficients would be the same. This of course was the
2008 Nov 13
0
sem and "simple variables"
salutations!
i am doing some longitudinal modeling with sem and thought calculating some
"simple variables" would make my model more readable. this is the smallest
subset of my model that illustrates the resulting problem.
i have 2 observed exogenous variables (c1, d2) and 4 observed endogenous
variables (dc1, dd1, dc2, dd2). c1 is the observed state at time 1, dc1 is
the change in c