, Jan 5, 2011 at 3:09 PM, David Winsemius dwinsem...@comcast.netwrote:
On Jan 5, 2011, at 2:40 PM, Douglas Bates wrote:
On Wed, Jan 5, 2011 at 1:22 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Jan 5, 2011, at 10:03 AM, Young Cho wrote:
Hi,
I am doing some simulations and found
Hi,
I am doing some simulations and found a bottle neck in my R script. I made
an example:
a = matrix(rnorm(500),100,5)
tt = Sys.time(); sum(a[,1]*a[,2]*a[,3]*a[,4]*a[,5]); Sys.time() - tt
[1] -1291.026
Time difference of 0.2354031 secs
tt = Sys.time(); sum(apply(a,1,prod));
Hi, thanks everyone for any help in advance.
I found myself dealing with a tabular time-series data formatted each row
like [ time stamp, ID, values]. I made a small examples:
X = data.frame(t=c(1,1,1,2,2,2,2,3,3,3,4,4,4,5,5),id =
Hi,
I have an accounting data with % at the end and () for negative.
E.g. if I read in with read.table, then R reads in as a factor:
[11625] 4.61%( 4.11%) 29.85% ( 1.27%) 16.04% 21.31% 14.09%
39.71%
[11633] 3.03%17.39% 80.13%
6648 Levels: ( 0.00%) ( 0.03%) ( 0.04%) ( 0.05%) (
I have been looking at 'lars' pkg and got puzzled by the behavior of
function 'lars'. I want to do weighted lasso regression and can't get a
match from lars output with lm output. Here is an example:
y = rnorm(10)
x = matrix(runif(50),nrow=10)
X = data.frame(y,x)
z = runif(10)
X =
I got my posting bounced and sorry if I accidentally post twice.
I have been looking at 'lars' pkg and got puzzled by the behavior of
function 'lars'. I want to do weighted lasso regression and can't get a
match from lars output with lm output. Here is an example:
y = rnorm(10)
x =
I am trying to extract coefficients from lars fit and can't find how to get
intercept. E.g.
y = rnorm(10)
x = matrix(runif(50),nrow=10)
X = data.frame(y,x)
fit1 = lars(as.matrix(X[,2:6]),as.matrix(X[,1]))
fit2 = lm(y~.,data=X)
Then, if I do:
7 matches
Mail list logo