Skip to content

Commit

Permalink
mxStandardizeRAMpaths(): improve new error message
Browse files Browse the repository at this point in the history
  • Loading branch information
RMKirkpatrick committed Feb 8, 2018
1 parent 5642836 commit 25eab2c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions R/MxSummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -1079,12 +1079,11 @@ logLik.MxModel <- function(object, ...) {
#Compute SEs, or assign them 'not requested' values, as the case may be:
if(SE){
if(!all(paramnames %in% rownames(ParamsCov))){
#TODO: use paste() to say which parameter labels aren't in the dimnames:
stop(paste(
"some free parameter labels do not appear in the dimnames of the parameter estimates' covariance matrix;\n",
"are you running mxStandardizeRAMpaths() on a dependent submodel instead of on its multigroup container model?\n",
"the missing parameter labels are:\n",
paramnames[!(paramnames %in% rownames(ParamsCov))],sep=""))
paste(paramnames[!(paramnames %in% rownames(ParamsCov))],collapse=", "),sep=""))
}
#From Mike Hunter's delta method example:
covParam <- ParamsCov[paramnames,paramnames]#<--submodel will usually not contain all free param.s
Expand Down

0 comments on commit 25eab2c

Please sign in to comment.