You are here

Set probability precision

6 posts / 0 new
Last post
pgseye's picture
Offline
Joined: 10/13/2009 - 23:50
Set probability precision

Hi,

Is there a way to set the precision of the reported p values to more than 2 decimal places. It might be something simple, but I can't find it in the documentation.

Thanks,

Paul

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
Where are you seeing p-values

Where are you seeing p-values with two decimal places?
Summary gives 7 for most values: p: 0.1936117

require(OpenMx)
data(demoOneFactor)
manifests <- names(demoOneFactor)
latents <- c("G")
factorModel <- mxModel("One Factor",
type="RAM",
manifestVars = manifests,
latentVars = latents,
mxPath(from=latents, to=manifests),
mxPath(from=manifests, arrows=2),
mxPath(from=latents, arrows=2,
free=FALSE, values=1.0),
mxData(cov(demoOneFactor), type="cov",
numObs=500))
summary(mxRun(factorModel))

pgseye's picture
Offline
Joined: 10/13/2009 - 23:50
Hi Tim, What am I doing

Hi Tim,

What am I doing wrong?

I can reproduce the above when pasting the code you gave, but in my own models I get NA for Summary and 2 decimal places in the tableFitStatistics function:

observed statistics: 1006
Constraint 'MeanMZFt1_t2' contributes 1 observed statistic.
Constraint 'MeanMZMt1_t2' contributes 1 observed statistic.
Constraint 'MeanDZFt1_t2' contributes 1 observed statistic.
Constraint 'MeanDZMt1_t2' contributes 1 observed statistic.
estimated parameters: 39
degrees of freedom: 967
-2 log likelihood: 1195.697
saturated -2 log likelihood: NA
number of observations: 1124
chi-square: NA
p: NA
AIC (Mx): -738.3029
BIC (Mx): -2798.569
adjusted BIC:
RMSEA: NA
timestamp: 2010-11-12 12:51:48
frontend time: 8.36237 secs
backend time: 9.81115 secs
independent submodels time: 8.487701e-05 secs
wall clock time: 18.17360 secs
cpu time: 18.17360 secs
openmx version number: 1.0.3-1505

> expectedMeansCovariances(equateMeansTwinFit)
...

> tableFitStatistics(univTwinSatFit, equateMeansTwinFit)
Name ep -2LL df AIC diffLL diffdf p
Model 1 : univTwinSat 39 1184.36 963 -741.64 - - -
Model 2 : equateMeansTwin 39 1195.7 967 -738.3 11.33 4 0.02

Thanks

tbates's picture
Offline
Joined: 07/31/2009 - 14:25
tableFitStatistics is not

tableFitStatistics is not part of OpenMx, but of a set of helper functions. it has not precision parameter. You could look inside and alter how it works if you want/can.

Alternatively, you might try the built in model comparison function

mxCompare(model1,model2)

pgseye's picture
Offline
Joined: 10/13/2009 - 23:50
Thanks Tim, I wasn't even

Thanks Tim,

I wasn't even aware about mxCompare.

Steve's picture
Offline
Joined: 07/30/2009 - 14:03
Also note from the mxCompare

Also note from the mxCompare help file:

"Use options(‘digits’=N) to set the minimum number of significant digits to be printed in values."