This post assumes you use UNIX-like operating system on your computer.
At some point I needed to run some extensive computations on a remote computer from my laptop. The problem was that this would take a long time and I would like to log out from the remote terminal and only log in later to see if the results were ready. If that is also your problem, then
screen is the software for you.
screen is useful to detach and reattach your terminals and to have multiple terminals when you’re logged in remotely.
If you don’t have it installed type:
sudo apt-get install screen
Log in to the remote account and start screen.
screen # start screen
R # Run something, e.g. R statistical software.
<Ctrl+a c> # That creates a new screen terminal.
R # Run another thing, R again in this case.
<Ctrl+a d> # That detaches screen from your session and sends it into the background.
Now that you have detached your screens you can log out, go to another computer and log in again.
screen -r # your screen terminals will be reattached.
You can press
<Ctrl+a n> or
<Ctrl+a p> to cycle through your terminals. Type
exit to terminate this screen session including all its terminals.
To scroll up and down you need to be in copy mode first, press
<Ctrl+a [> to enter in copy mode and
Esc to exit copy mode.
Consider a two dimensional lattice, each node of which has a random variable associated with it. One definition of nearest-neighbor models which might be applied to describe the interactions between the variables in this situation is through conditional probabilities of the form
Although (1) provides a intuitive representation, it has some drawbacks. For instance, there is no direct method of evaluating the joint probability distribution on the lattice, and the functional form of the conditional probability on the right-hand side of (1) is subject to severe consistency conditions.
Assuming that the model is spatially homogeneous, and that we have binary data Besag (1972) have shown that we may write
where , and are arbitrary real numbers. The similarity of the above model with the logistic regression model led it to be called an auto-logistic model.
If a boundary of zeros surrounds the inner array of the lattice , then
where the summation extends over all and is a normalizing function, dependent also upon the dimensions of the array.
The above results are valid for any shape of closed boundary. Notice that with this result we get a valid functional form for the conditional probability in Eq. (1), but we still don’t have a direct method of evaluating the joint probability distribution on the lattice.
Besag, J.E., 1972. Nearest-neighbor systems and the auto-logistic model for binary data. Journal of the Royal Statistical Society. Series B (Methodological), 75-83