Skip to content

Commit

Permalink
add undocumented inlet
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Dec 13, 2024
1 parent 8e3ea08 commit 6213d74
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions R/03-estimation.R
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ ESTIMATION <- function(data, model, group, itemtype = NULL, guess = 0, upper = 1
keep_vcov_PD=opts$keep_vcov_PD, symmetric=opts$technical$symmetric,
MCEM_draws=opts$MCEM_draws, omp_threads=opts$omp_threads),
Theta=Theta, DERIV=DERIV, solnp_args=opts$solnp_args, control=control,
nconstrain=opts$technical$nconstrain)
nconstrain=opts$technical$nconstrain, fixedEtable=opts$technical$fixedEtable)
if(opts$method == 'MCEM')
opts$quadpts <- opts$MCEM_draws(ESTIMATE$cycles)
opts$Moptim <- ESTIMATE$Moptim
Expand Down Expand Up @@ -1132,8 +1132,10 @@ ESTIMATION <- function(data, model, group, itemtype = NULL, guess = 0, upper = 1
Internals$thetaPosterior <- tmp
}
}
if(opts$storeEtable)
if(opts$storeEtable){
Internals$Etable <- ESTIMATE$Etable
Internals$Theta <- Theta
}
if(opts$storeEMhistory)
Internals$EMhistory <- ESTIMATE$EMhistory
if(opts$method == 'SEM') Options$TOL <- NA
Expand Down
4 changes: 3 additions & 1 deletion R/EMstep.group.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
EM.group <- function(pars, constrain, Ls, Data, PrepList, list, Theta, DERIV, solnp_args, control,
nconstrain=NULL)
nconstrain=NULL, fixedEtable=NULL)
{
verbose <- list$verbose
lrPars <- list$lrPars
Expand Down Expand Up @@ -251,6 +251,8 @@ EM.group <- function(pars, constrain, Ls, Data, PrepList, list, Theta, DERIV, so
ngroups=ngroups, itemloc=itemloc, CUSTOM.IND=CUSTOM.IND,
dentype=dentype, rlist=rlist, full=full, Etable=list$Etable,
omp_threads=list$omp_threads)
if(!is.null(fixedEtable))
Elist$rlist[[1]]$r1 <- fixedEtable
rlist <- Elist$rlist; LL <- Elist$LL
if(any(ANY.PRIOR)){
LP <- 0
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ makeopts <- function(method = 'MHRM', draws = 2000L, calcLL = TRUE, quadpts = NU
'internal_constraints', 'SEM_window', 'delta', 'MHRM_SE_draws', 'Etable', 'infoAsVcov',
'PLCI', 'plausible.draws', 'storeEtable', 'keep_vcov_PD', 'Norder', 'MCEM_draws',
"zeroExtreme", 'mins', 'info_if_converged', 'logLik_if_converged', 'omp', 'nconstrain',
'standardize_ref', "storeEMhistory")
'standardize_ref', "storeEMhistory", 'fixedEtable')
if(!all(tnames %in% gnames))
stop('The following inputs to technical are invalid: ',
paste0(tnames[!(tnames %in% gnames)], ' '), call.=FALSE)
Expand Down

0 comments on commit 6213d74

Please sign in to comment.