Skip to content

Commit

Permalink
v0.5.1 Fixed fitted sampling function
Browse files Browse the repository at this point in the history
  • Loading branch information
samuel-watson committed Nov 17, 2023
1 parent eab397c commit 013b9ff
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions R/R6Model.R
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ Model <- R6::R6Class("Model",
} else {
Xb <- matrix(NA,nrow=self$n(),ncol=sample_n)
b_curr <- Model__get_beta(private$ptr,private$model_type())
M <- Model__information_matrix(private$ptr,private$model_type())
M <- self$information_matrix()
ML <- chol(solve(M))
for(i in 1:sample_n){
u <- rnorm(length(b_curr))
Expand Down Expand Up @@ -608,10 +608,14 @@ Model <- R6::R6Class("Model",
if(is.null(private$ptr)){
private$update_ptr()
}
if(include.re){
if(include.re & !private$model_type()>0){
return(Model__obs_information_matrix(private$ptr,private$model_type()))
} else {
return(Model__information_matrix(private$ptr,private$model_type()))
if(private$model_type()==0){
return(Model__information_matrix(private$ptr,private$model_type()))
} else {
return(Model__information_matrix_crude(private$ptr,private$model_type()))
}
}
},
#' @description
Expand Down

0 comments on commit 013b9ff

Please sign in to comment.