Description Usage Arguments Value Author(s) Examples

View source: R/draw_lm_basic_cont.R

Function that draws samples from the basic LM model for continuous outcomes with specific parameters.

**The function is no longer maintained. Please look at** `drawLMbasiccont`

**function**.

1 | ```
draw_lm_basic_cont(piv, Pi, Mu, Si, n)
``` |

`piv ` |
vector of initial probabilities of the latent Markov chain |

`Pi ` |
set of transition probabilities matrices (k x k x TT) |

`Mu ` |
matrix of conditional means for the response variables (r x k) |

`Si ` |
var-cov matrix common to all states (r x r) |

`n ` |
sample size |

`Y ` |
array of continuous outcomes (n x TT x r) |

Francesco Bartolucci, Silvia Pandolfi, University of Perugia (IT), http://www.stat.unipg.it/bartolucci

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
## Not run:
# draw a sample for 1000 units and 3 response variable
n <- 1000
TT <- 5
k <- 2
r <- 3 #number of response variables
piv <- c(0.7,0.3)
Pi <- matrix(c(0.9,0.1,0.1,0.9), k, k)
Pi <- array(Pi, c(k, k, TT))
Pi[,,1] <- 0
Mu <- matrix(c(-2,-2,0,0,2,2), r, k)
Si <- diag(r)
out <- draw_lm_basic_cont(piv, Pi, Mu, Si, n)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.