Displaying 20 results from an estimated 5000 matches similar to: "lm.fit peak memory usage"
2012 Apr 26
2
How does .Fortran "dqrls" work?
Hi, all.
I want to write some functions like glm() so i studied it.
In glm.fit(), it calls a fortran subroutine named "dqrfit" to compute least
squares solutions
to the system
x * b = y
To learn how "dqrfit" works, I just follow how glm() calls "dqrfit" by my
own example, my codes are given below:
> qr <-
>
2007 Dec 18
1
R-users
R-users
E-mail: r-help@r-project.org
I have a quenstion on "gam()" in "gam" package.
The help of gam() says:
'gam' uses the _backfitting
algorithm_ to combine different smoothing or fitting methods.
On the other hand, lm.wfit(), which is a routine of gam.fit() contains:
z <- .Fortran("dqrls", qr = x * wts, n = n, p = p, y = y *
2006 Aug 21
5
lean and mean lm/glm?
Hi All: I'm new to R and have a few questions about getting R to run efficiently with large datasets.
I'm running R on Windows XP with 1Gb ram (so about 600mb-700mb after the usual windows overhead). I have a dataset that has 4 million observations and about 20 variables. I want to run probit regressions on this data, but can't do this with more than about 500,000 observations before
2007 Dec 18
2
"gam()" in "gam" package
R-users
E-mail: r-help@r-project.org
I have a quenstion on "gam()" in "gam" package.
The help of gam() says:
'gam' uses the _backfitting
algorithm_ to combine different smoothing or fitting methods.
On the other hand, lm.wfit(), which is a routine of gam.fit() contains:
z <- .Fortran("dqrls", qr = x * wts, n = n, p = p, y = y *
2002 Feb 27
1
Bug in glm.fit? (PR#1331)
G'day all,
I had a look at the GLM code of R (1.4.1) and I believe that there are
problems with the function "glm.fit" that may bite in rare
circumstances. Note, I have no data set with which I ran into
trouble. This report is solely based on having a look at the code.
Below I append a listing of the glm.fit function as produced by my
system. I have added line numbers so that I
2003 May 23
1
Opening a file in mode "r+" or "r+b"
While using the file functions have found a few more issues (on both Unix
and Windows) ie
R documentation:
In the "close" description (base package) we see that the possible values
for the mode 'open' the "r+" and "r+b" values are repeated, and are
incorrect the second time. The second set actually corresponds to the "w+" /
"w+b", see
2005 Apr 13
1
lm() with many responses
Hi all,
I have one array of predictors, one observation per row, and one array
of responses, also arranged one observation per row. I arrange these
into a data.frame and call lm() with a pasted-together formula.
I would like to call lm() with a number of responses in excess of 100,
but for some reason, 39 seems to be a limit. Why do I get an "invalid
variable names" error from
2012 Feb 08
0
glm.fit and pearson's correlation coefficient
I did a linear correlation of data using glm.fit and stored the output in the
object "f":
f <- glm.fit(x, y, w)
I am intereseted in estimating the quality of the correlation. I am used to
do it using pearson correlation coefficient "r" or "r^2". Can I extract this
coefficient from the output of glm.fit?
Is there another number in the output of glm.fit that
1999 Apr 30
1
Question on the idiom: start <- coef; start[fit$pivot] <- coef
I wonder if someone could explain how the following R idiom works (it's
used in
glm.fit).
start <- coef
start[fit$pivot] <- coef
coef is a vector of coefficients, set by .Fortran("dqrls", ...).
fit$pivot is a vector of integer indexes (indicating how dqrls permuted
the columns
of x). If coef has n elements, fit$pivot is a permutation of seq(1,5).
start[fit$pivot]
2011 Apr 19
1
How to Extract Information from SIMEX Output
Below is a SIMEX object that was generated with the "simex" function from the
"simex" package applied to a logistic regression fit. From this mountain of
information I would like to extract all of the values summarized in this
line:
.. ..$ variance.jackknife: num [1:5, 1:4] 1.684 1.144 0.85 0.624 0.519 ...
Can someone suggest how to go about doing this? I can extract the
2011 Nov 21
0
Suggested improvement for src/library/base/man/qraux.Rd
Here is a modified version of qraux.Rd, an edited version of
R-2.14.0/src/library/base/man/qraux.Rd
This gives some details and an example for the case of pivoting.
In this case, it is not true that X = QR; rather X[, pivot] = QR.
It may save some other people bugs and time to have this information.
Tim Hesterberg
--------------------------------------------------
% File
2002 Apr 29
1
Garbage collection: RW1041
Have searched through the archives but have been unable to find any related
issues - hopefully I'm not bringing up an old topic.
Am using RW1041 on a Windows NT on a machine with 1Gb of memory. Have a
function doit() that reads in a chunk of data using readBin, performs a
regression, saves out coeffs and then returns. When using Rgui with the
default memory limit of 256Mb I'm able to
2009 Feb 27
0
help with correct use of function lsfit
To the purpose of fitting a 2nd order polynomial (a + b*x + c*x^2) to the chunk of signal falling in a 17 consecutive samples window
I wrote the following very crude script. Since I have no previous experience of using Least Square Fit with R I would appreciate
your supervision and suggestion.
I guess the returned coefficients of the oolynomial are:
a = -1.3191398
b = 0.1233055
c = 0.9297401
2002 Nov 01
0
File access from within a DLL
Hi,
Is there a recommended method using R header files for opening files from
within a DLL? I can remember reading something on this topic, but have been
unable to find it in any of the recent FAQs or in the help archive.
I'm using the C open/lseek/read/close functions with the usual C header files
ie
#include <stdio.h>
#include <math.h>
#include <string.h>
2003 Jul 16
2
Is there a bug in qr(..,LAPACK=T)
The following snippet suggests that there is either a bug in qr(,LAPACK=T), or some bug in my understanding. Note that the detected rank is correct (= 2) using the default LINPACK qr, but incorrect (=3) using LAPACK. This is running on Linux Redhat 9.0, using the lapack library that comes with the Redhat distribution. I'm running R 1.7.1 compiled from the source. If the bug is in my
2007 Sep 01
1
row echelon form
Hi everyone,
I am looking to use R as a MATLAB replacement for linear algebra.
I've done a fairly good job for finding replacements for most of the
functions I'm interested in, I
John Fox wrote a program for implementing the reduced row echelon form
of a matrix (by doing the Gauss-Jordan elimination). I modified it a
bit:
rref <- function(A,
2006 Aug 31
1
NaN when using dffits, stemming from lm.influence call
Hi all
I'm getting a NaN returned on using dffits, as explained
below. To me, there seems no obvious (or non-obvious reason
for that matter) reason why a NaN appears.
Before I start digging further, can anyone see why dffits
might be failing? Is there a problem with the data?
Consider:
# Load data
dep <-
2012 Sep 07
1
Suggest adding a 'pivot' argument to qr.R
I suggest adding a 'pivot' argument to qr.R, to obtain columns in the
same order as the original x, so that
a <- qr(x)
qr.Q(a) %*% qr.R(a, pivot=TRUE)
returns x.
--------------------------------------------------
# File src/library/base/R/qr.R
qr.R <- function(qr, complete = FALSE, pivot = FALSE)
{
# Args:
# qr: a QR decomposition, produced by qr()
# complete:
2003 May 23
1
isSeekable returns F on seekable file
Hi,
Seems that on RWin 1.7.0 and 1.6.2 isSeekable returns F on binary files,
while seek() works as expected on the same connection - see example below:
> con = file(nm, "rb")
> isSeekable(con)
[1] FALSE
> readBin(con, double(), 10)
[1] 7.263824e-317 5.968155e-317 2.340685e-317 2.734062e-312
4.088386e-312 4.670335e-317
[7] 6.097545e-317 3.396341e-312 6.615484e-317
2009 Jun 17
3
Matrix inversion-different answers from LAPACK and LINPACK
Hello.
I am trying to invert a matrix, and I am finding that I can get different
answers depending on whether I set LAPACK true or false using "qr". I had
understood that LAPACK is, in general more robust and faster than LINPACK,
so I am confused as to why I am getting what seems to be invalid answers.
The matrix is ostensibly the Hessian for a function I am optimizing. I want
to get