PMC.RAM {LaplacesDemon}  R Documentation 
PMC RAM Estimate
Description
This function estimates the randomaccess memory (RAM) required to
update a given model and data with PMC
.
Warning: Unwise use of this function may crash a computer, so please read the details below.
Usage
PMC.RAM(Model, Data, Iterations, Thinning, M, N)
Arguments
Model 
This is a model specification function. For more
information, see 
Data 
This is a list of Data. For more information, see

Iterations 
This is the number of iterations for which

Thinning 
This is the amount of thinning applied to the samples
in 
M 
This is the number of mixture components in

N 
This is the number of samples in 
Details
The PMC.RAM
function uses the
object.size
function to estimate the size in MB of RAM
required to update in PMC
for a given model and data,
and for a number of iterations and specified thinning. When RAM is
exceeded, the computer will crash. This function can be useful when
trying to estimate how many samples and iterations to update a
model without crashing the computer. However, when estimating the
required RAM, PMC.RAM
actually creates several large
objects, such as post
(see below). If too many iterations are
given as an argument to PMC.RAM
, for example, then it
will crash the computer while trying to estimate the required RAM.
The best way to use this function is as follows. First, prepare the model specification and list of data. Second, observe how much RAM the computer is using at the moment, as well as the maximum available RAM. The majority of the difference of these two is the amount of RAM the computer may dedicate to updating the model. Next, use this function with a small number of iterations. Note the estimated RAM. Increase the number of iterations, and again note the RAM. Continue to increase the number of iterations until, say, arbitrarily within 90% of the abovementioned difference in RAM.
The computer operating system uses RAM, as does any other software
running at the moment. R is currently using RAM, and other functions
in the LaplacesDemon
package, and any other package that is
currently activated, are using RAM. There are numerous small objects
that are not included in the returned list, that use RAM. For example,
perplexity is a small vector, etc.
A potentially large objects that is not included is a matrix used for
estimating LML
.
Value
PMC.RAM
returns a list with several components. Each component
is an estimate in MB for an object. The list has the following
components:
alpha 
This is the estimated size in MB of RAM required for the matrix of mixture probabilities by iteration. 
Covar 
This is the estimated size in MB of RAM required for the covariance matrix or matrices. 
Data 
This is the estimated size in MB of RAM required for the list of data. 
Deviance 
This is the estimated size in MB of RAM required for the deviance vector before thinning. 
Initial.Values 
This is the estimated size in MB of RAM required for the matrix or vector of initial values. 
LH 
This is the estimated size in MB of RAM required for the

LP 
This is the estimated size in MB of RAM required for the

Model 
This is the estimated size in MB of RAM required for the model specification function. 
Monitor 
This is the estimated size in MB of RAM required for
the 
Posterior1 
This is the estimated size in MB of RAM required for
the 
Posterior2 
This is the estimated size in MB of RAM required for
the 
Summary 
This is the estimated size in MB of RAM required for the summary table. 
W 
This is the estimated size in MB of RAM required for the matrix of importance weights. 
Total 
This is the estimated size in MB of RAM required in total
to update with 
Author(s)
Statisticat, LLC. software@bayesianinference.com
See Also
BigData
,
LML
,
object.size
, and
PMC
.