search for: rowsperobs

Displaying 1 result from an estimated 1 matches for "rowsperobs".

2008 Jan 20
2
Efficient way for multiplying vectors with a only certain number of rows in a matrix
Dear R-users, I am working on a problem that I am currently not able to solve efficiently. It is about multiplying one column of a matrix with only a certain number of rows of another matrix. Let me illustrate my problem with an example: n.obs = 800 n.rowsperobs = 300 n.param = 23 Designmat = matrix(rnorm(n.obs*n.rowsperobs*n.param),ncol=n.param) Betamat = matrix(rnorm(n.obs*n.param),nrow=n.param) In this example, "Designmat" consists of 800*300 rows, meaning that 300 rows belong to one of the 800 observations. Each observation has also one p...