This has nothing to do with your question, but instead of using
class=c(rep(1,3),rep(2,3),rep(3,3))
It's probably easier to use class = rep(1:3, each =3)
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
Thank you, that is much simpler!
On Thu, Dec 15, 2011 at 2:04 PM, Rui Barradas ruipbarra...@sapo.pt wrote:
Hello,
I believe I can help, or at least, my code is simpler.
First, look at your first line:
idd - length(diag(1,tt)) # length of intercept matrix
#
not needed: diag(tt) would
*numco)
for(i in 1:numco){
X[,((i-1)*tt+1):(i*tt)] - matrix(
c(matrix(rep(diag(1,tt),n),ncol=tt, byrow=TRUE)) *
rep(rep(x[,i],each=tt),tt)
, ncol=tt)
}
X
It works fine, but is there an easier way when n, tt, and numco get
larger and larger?
Thanks,
Tina
--
Clemontina
.
Tina
On Thu, Dec 15, 2011 at 10:02 AM, Clemontina Alexander
ckale...@ncsu.edu wrote:
Dear R list,
I have the following data:
set.seed(1)
n - 5 # number of subjects
tt - 3 # number of repeated observation per subject
numco - 2 # number of covariates
x - matrix(round(rnorm(n
I have a list 'ans' from the following code:
tt - rnorm(50)
rr - rnorm(50)
ans - lm(rr~tt)
ans[1] is $coefficients, ans[2] is $residuals, ans[3] is
$effects, ... and so on up to ans[12]. Is there an easy way to
display just these names and not the data they contain? I thought I
saw my advisor
Lianoglou
mailinglist.honey...@gmail.com wrote:
Hi Clemontina,
On Fri, Sep 9, 2011 at 11:01 AM, Clemontina Alexander ckale...@ncsu.edu
wrote:
I have a list 'ans' from the following code:
tt - rnorm(50)
rr - rnorm(50)
ans - lm(rr~tt)
ans[1] is $coefficients, ans[2] is $residuals, ans[3
Hi,
If you go to this site:
http://pngu.mgh.harvard.edu/~purcell/plink/res.shtml#teach
And download the teaching.zip file, I think there was information in
the word document about reading plink data into R, though I am not
100% sure. I think a read.table(filename.ped, header=T) command may
be
I have used lars before. I could not find a tutorial, so finally asked
a professor at my school. He has a wrapper that nicely prints out all
the variables that were selected and is more stable in cross
validation than the original package. See below for the code and
description.
Lianoglou wrote:
Hi,
On Mon, May 2, 2011 at 12:45 PM, Clemontina Alexander ckale...@ncsu.edu
wrote:
Hi! This is my first time posting. I've read the general rules and
guidelines, but please bear with me if I make some fatal error in
posting. Anyway, I have a continuous response and 29 predictors
Hi! This is my first time posting. I've read the general rules and
guidelines, but please bear with me if I make some fatal error in
posting. Anyway, I have a continuous response and 29 predictors made
up of continuous variables and nominal and ordinal categorical
variables. I'd like to do lasso
for levels A and B, but not C and D, does this mean that X1 should be
included in the model?
Thanks.
On Mon, May 2, 2011 at 2:47 PM, David Winsemius dwinsem...@comcast.net wrote:
On May 2, 2011, at 10:51 AM, Steve Lianoglou wrote:
Hi,
On Mon, May 2, 2011 at 12:45 PM, Clemontina Alexander ckale
11 matches
Mail list logo