Displaying 20 results from an estimated 2000 matches similar to: "linear model benchmarking"
2006 Apr 24
1
Handling large dataset & dataframe [Broadcast]
Here's a skeletal example. Embellish as needed:
p <- 5
n <- 300
set.seed(1)
dat <- cbind(rnorm(n), matrix(runif(n * p), n, p))
write.table(dat, file="c:/temp/big.txt", row=FALSE, col=FALSE)
xtx <- matrix(0, p + 1, p + 1)
xty <- numeric(p + 1)
f <- file("c:/temp/big.txt", open="r")
for (i in 1:3) {
x <- matrix(scan(f, nlines=100), 100,
2009 Mar 31
1
error during DPpackage compilation
Dear All,
I've had trouble compiling DPpackage as a user in one system. It works fine
as root in other machines.
I can see any clues in error messages My guess is that it is a permissions
matter.
Any help is appreciated.
OS: Linux
Kernel: 2.6.27 SMP
Arch: Intel 64 bits
gfortran not available
Thank you.
----------------------><8-------------------------------------
g77 ? -fpic ?-g
2009 Mar 25
3
very fast OLS regression?
Dear R experts:
I just tried some simple test that told me that hand computing the OLS
coefficients is about 3-10 times as fast as using the built-in lm()
function. (code included below.) Most of the time, I do not care,
because I like the convenience, and I presume some of the time goes
into saving a lot of stuff that I may or may not need. But when I do
want to learn the properties of an
2007 Oct 03
1
inverse of matrix made by low.tri function
Hi all,
I am using R trying to get a inverse matrix of (X^T)X , but I keep getting
the error
message like: no b argument and no default value for sprintf(gettext(fmt,
domain = domain), ...) .
--------------------------------------------------------------------------------------------
# my code
X<-Matrix(rep(1,500),100,5)
X[lower.tri(X)]<-1-10^-7
XtX<- t(X)%*% X
XtXu<-lu(XtX)
2007 Aug 16
4
Linear models over large datasets
I'd like to fit linear models on very large datasets. My data frames
are about 2000000 rows x 200 columns of doubles and I am using an 64
bit build of R. I've googled about this extensively and went over the
"R Data Import/Export" guide. My primary issue is although my data
represented in ascii form is 4Gb in size (therefore much smaller
considered in binary), R consumes about
2005 Feb 02
0
Not reproducing GLS estimates
Dear List:
I am having some trouble reproducing some GLS estimates using matrix
operations that I am not having with other R procedures. Here are some
sample data to see what I am doing along with all code:
mu<-c(100,150,200,250)
Sigma<-matrix(c(400,80,16,3.2,80,400,80,16,16,80,400,80,3.2,16,80,400),n
c=4)
sample.size<-100
temp <-
2008 Jun 12
0
[LLVMdev] code generation order revisited.
On Jun 12, 2008, at 11:38, Hendrik Boom wrote:
> On Tue, 06 May 2008 16:06:35 -0400, Gordon Henriksen wrote:
>
>> On 2008-05-06, at 13:42, Hendrik Boom wrote:
>>
>>> One more question. I hope you're not getting tired of me already.
>>> Does generating LLVM code have to proceed in any particular order?
>>>
>>> Of course, if I am writing
2008 Jun 12
2
[LLVMdev] code generation order revisited.
>>
>> I think I may have found an exception to this -- the API seems to
>> require me to have all the fields for a struct ready before I
>> construct the struct. I don't have the ability to make a struct
>> type, use it to declare some variables, and still contribute fields
>> to it during the rest of the compilation.
>>
>> Is there a
2004 Jul 07
9
Windows 2K outperform Linux/Samba very much?
Hi, all:
I want to check small files' property(such as date, path, and so on)
frequently. The files are stored in netwrok driver and their sizes
vary from 2KB to 5KB.
I found that Windows 2K outperform Linux/Samba very much after I
campared the bench results. I am very confused about it and who can
explain it?
The computers' configurations are as follows:
1. PC Client
It
2009 Mar 12
4
stats lm() function
Hi,
Im using the lm() function where the formula is quite big (300 arguments)
and the data is a frame of 3000 values.
This is running in a loop where in each step the formula is reduced by one
argument, and the lm command is called again (to check which arguments are
useful) .
This takes 1-2 minutes.
Is there a way to speed this up?
i checked the code of the lm function and its seems that its
2015 Mar 19
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
Hi Martin
I got stung by this last week.
glmnet produces a coefficient matrix of class ?dgCMatrix?
If a predictor matrix was created using sparseMatrix as follows,
one gets unexpected results, as this simple example shows.
My fix was easy (I always convert the predictor matrix to class ?dgCMatrix? now)
Trevor
> y=Matrix(diag(4))
> y
4 x 4 diagonal matrix of class "ddiMatrix"
2015 Mar 20
0
RFC: Matrix package: Matrix products (%*%, crossprod, tcrossprod) involving "nsparseMatrix" aka sparse pattern matrices
Hi Martin,
package arules heavily relies on ngCMatrix and uses multiplication and
addition for logical operations. I think it makes sense that in a mixed
operation with one dgCMatrix and one ngCMatrix the ngCMatrix should be
"promoted" to a dgCMatrix.
The current behavior of %*% and friends is in deed confusing:
> m <- matrix(sample(c(0,1), 5*5, replace=TRUE), nrow=5)
>
2007 Oct 30
1
Some matrix and sandwich questions
Dear R-help,
I have a four-part question about regression, matrices, and sandwich package.
1) In the sandwich package, I would like to better understand the
meat() function.
>From the bread() documentation, for a simple OLS regression, bread() returns
(1/n * X'X)^(-1)
That is, for a simple regression (per the documentation on bread()):
MyLM <- lm(y ~ x)
bread(MyLM)
2006 Jun 09
1
X'W in Matrix
Hi!
I have used the Matrix package (Version: 0.995-10) successfully
to obtain the OLS solution for a problem where the design matrix X is
44000x6000. X is very sparse (about 80000 non-zeros elements).
Now I want to do WLS: (X'WX)^-1X'Wy
I tried W=Diagonal(length(w),w) and
wX=solve(X,W)
but after various minutes R gives a not enough
memory error (Im using a 64bit machine with 16Gigs
2005 Oct 27
0
Column names in qr() and chol() (PR#8258)
I am using 2.2.0
If the QR decomposition of an N*M matrix is such that the pivoting order
is not 1:M, Q%*%R does not result in the original matrix but in a
matrix with the columns permuted. This is clearly intentional, and
probably to be expected if pivoting is used --- chol() behaves in the
same manner (it would perhaps be nice if the qr help page made that
clear in the same way that the chol()
2003 Apr 20
4
${EPOCH} and ${DATETIME} patch
Skipped content of type multipart/alternative-------------- next part --------------
Index: pbx.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx.c,v
retrieving revision 1.14
diff -u -r1.14 pbx.c
--- pbx.c 19 Apr 2003 02:41:22 -0000 1.14
+++ pbx.c 21 Apr 2003 02:27:43 -0000
@@ -713,6 +713,8 @@
{
char *first,*second;
char tmpvar[80] =
2010 May 21
2
Data reconstruction following PCA using Eigen function
Hi all,
As a molecular biologist by training, I'm fairly new to R (and statistics!),
and was hoping for some advice. First of all, I'd like to apologise if my
question is more methodological rather than relating to a specific R
function. I've done my best to search both in the forum and elsewhere but
can't seem to find an answer which works in practice.
I am carrying out
2011 Dec 03
2
density function always evaluating to zero
Dear R users,
I'm trying to carry out monte carlo integration of a posterior density
function which is the product of a normal and a gamma distribution. The
problem I have is that the density function always returns 0. How can I
solve this problem?
Here is my code
#generate data
x1 <- runif(100, min = -10, max = 10)
y <- 2 * x1^2 + rnorm(100)
# # # # # # # # Model 0 # # # # # # #
2010 Mar 27
1
R runs in a usual way, but simulations are not performed
Dear addresses, I need perform a batch of 10 000 simulations for each of
4 options considered. (The idea is to obtain the parameter estimates in
a heteroskedastic linear regression model - with additive or mixed
heteroskedasticity - via the Kenward-Roger small-sample adjusted
covariance matrix of disturbances). For this purpose I wrote an R
program which would capture all possible options (true
2006 Nov 21
1
crossprod(x) vs crossprod(x,x)
I found out the other day that crossprod() will take a single matrix
argument;
crossprod(x) notionally returns crossprod(x,x).
The two forms do not return identical matrices:
x <- matrix(rnorm(3000000),ncol=3)
M1 <- crossprod(x)
M2 <- crossprod(x,x)
R> max(abs(M1-M2))
[1] 1.932494e-08
But what really surprised me is that crossprod(x) is slower than
crossprod(x,x):
R>