You are here

P-values for coefficients

4 posts / 0 new
Last post
bean11's picture
Joined: 10/24/2013 - 14:14
P-values for coefficients


I have estimated my SEM model in OpenMx. For two days I was looking for answer but I haven't solved it.
How can I obtain p-values for coefficients to check significance of my variables?

Unfortunately, I can't attach my data due to confidentiality agreement.

Thank you,

mhunter's picture
Joined: 07/31/2009 - 15:26
?mxCI; ?mxCompare

You could divide your estimates by there standard errors and use lookup tables or R to determine the p-values.

ests <- c(1.231, 4.654, 3.37, 2.54, 6.11)
errs <- rep(.1, length(ests))
pnorm(abs(ests/errs), lower.tail=TRUE)*2

I think these are the p-values given by Mplus, AMOS, etc. But this is rather strongly recommended against. A MUCH better option is to use confidence intervals with the mxCI function. If the confidence interval for a parameter spans zero, then it is probably not different from zero.

You could also construct nested models that evaluate various hypotheses of interest and compare the nested models via likelihood ratio test, AIC, and BIC using mxCompare.

bean11's picture
Joined: 10/24/2013 - 14:14
Thank you for answer. I think

Thank you for answer.
I think that for p-values I should use:

2 * (1-pnorm(abs(Estimate/Std.Error)))

In my summary output I do not receive any values in lbound ubound columns, despite I put intervals=TRUE in mxRun. I can not execute mxCI function. I will try with nested models.

tbates's picture
Joined: 07/31/2009 - 14:25
mxCI usage

1-pnorm gives you the lower.tail

Getting a CI is a two-stage thing, a bit like adding a path. You use mxCI() to add a list of things you want CIs for to the model, then you run the model, with intervals = T.

m1 = mxModel(m1, mxCI(c("A")) # list the things you want CIs for.
m1 = mxRun(m1, intervals= T)

see ?mxCI for more examples. the strings in mxCI can be anything with a name: A matrix (all cells get run), a specific label name, or an address like "A[1,1]"

PS: The CIs do not appear in ubound/lbound in the summary (that is where actual bounds will be shown). Instead, the summary will contain a little CI table, listing each CI and the estimate in the middle.

PPS: You have to set intervals= T as well as just mxRun() because they can take a long time, and during development of a model, the default of intervals= F makes running much faster