Displaying 20 results from an estimated 4000 matches similar to: "GAM, how to set qr=TRUE"
2011 Dec 09
3
gam, what is the function(s)
Hello,
I'd like to understand 'what' is predicting the response for library(mgcv)
gam?
For example:
library(mgcv)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
xx <- seq(min(l_yx[,2]),max(l_yx[,2]),len=101)
plot(xx,predict(fit,data.frame(x=xx),type="response"),type="l")
I want to see the generalized function(s) used to predict the response
2012 Mar 14
1
gam - Y axis probability scale with confidence/error lines
Hello,
How do I plot a gam fit object on probability (Y axis) vs raw values (X
axis) axis and include the confidence plot lines?
Details...
I'm using the gam function like this:
l_yx[,2] = log(l_yx[,2] + .0004)
fit <- gam(y~s(x),data=as.data.frame(l_yx),family=binomial)
And I want to plot it so that probability is on the Y axis and values are
on the X axis (i.e. I don't want log
2011 Dec 01
1
logistic regression - glm.fit: fitted probabilities numerically 0 or 1 occurred
Sorry if this is a duplicate: This is a re-post because the pdf's mentioned
below did not go through.
Hello,
I'm new'ish to R, and very new to glm. I've read a lot about my issue:
Warning message:
glm.fit: fitted probabilities numerically 0 or 1 occurred
...including:
http://tolstoy.newcastle.edu.au/R/help/05/07/7759.html
2007 May 15
2
QR Decompositon and qr.qty
Dear R people,
I do not have much knowledge about linear algebra but currently I need
to understand what the function qr.qty is actually doing. The
documentation states that it calculates t(Q) %*% y via a previously
performed QR matrix decomposition.
In order to do that, I tried following basic example:
m<-matrix(c(1,0,0,0,1,0,0,0,1,0,0,1),ncol=3) # 4x3 matrix
2012 Dec 03
1
qr.qy and qr.qty give an error message when y is integer and LAPACK=TRUE
With this example
set.seed(123)
A <- matrix(runif(40), nrow = 8)
y <- 1:nrow(A)
A.laqr <- qr(A, LAPACK=TRUE)
both qr.qy(A.laqr,y) and qr.qty(A.laqr,y) give the respective error messages
Error in qr.qy(A.laqr, y) : 'b' must be a numeric matrix
Error in qr.qty(A.laqr, y) : 'b' must be a numeric matrix
However when Lapack is not used as in
A.liqr <- qr(A,
2018 May 19
1
Bug on qr.coef when qr is created by a zero matrix with colnames and all y equals zero
Dear maintainers,
I'm reporting a bug in qr.coef that mishandles the colnames of matrix. A minimal reproducible example is as follows:
x <- cbind(rep(0, 10), rep(0, 10))
y <- rep(0, 10)
q <- qr.default(x)
qr.coef(q, y)
[1] NA NA
If x has colnames, then qr.coef will end up with an error:
x <- cbind(x1 = rep(0, 10), x2 = rep(0, 10))
y <- rep(0, 10)
q <- qr.default(x)
2008 Nov 03
1
qr() and Gram-Schmidt
Hi,
Why the qr() produces a negative Q compared with Gram-Schmidt? (note
example below, except Q[2,3])
Here is an example, I calculate the Q by Gram-Schmidt process and
compare the output with qr.Q()
a <- c(1,0,1)
b <- c(1,0,0)
c <- c(2,1,0)
x <- matrix(c(a,b,c),3,3)
##########################
# Gram-Schmidt
##########################
A <- matrix(a,3,1)
q1 <-
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
2000 Mar 01
1
"is.qr" definition (PR#465)
Might it be possible to tighten the definition of "is.qr". I
noticed that after I mistakenly typed
example(lm) # make lm object named lm.D9
qr.Q(lm.D9)
which exhausted the heap memory and produced two warning
messages. As an object of class "lm" has a "qr" component,
"is.qr" failed to detect that "lm.D9" was not a "qr" object. The
2006 Jan 12
1
follow-up on qr.coef bug (PR#8478)
The bug I submitted yesterday (It's not entered in the bug data base, so
I have no ID for it) included a suggested fix that
is not correct. It worked for the examples I gave because there was no
pivoting in fact, or only pivot permutations that were
idempotent. A correction that works in general on the examples I gave
makes these two changes in qr.coef():
## coef[qr$pivot, ]
2007 May 04
1
Bug in qr.R ? (PR#9655)
Ladies and Gentlemen,
using
> A <- structure(c(1, 0, 0, 3, 2, 1, 4, 5, -3, -2, 1, 0), .Dim =
as.integer(c(3,4)))
I get
> dim(A)
[1] 3 4
> qr.R(qr(A),complete=TRUE)
[,1] [,2] [,3] [,4]
[1,] -1 -3.000000 -4.000000 2.0000000
[2,] 0 -2.236068 -3.130495 -0.8944272
[3,] 0 0.000000 -4.919350 -0.4472136
> qr.R(qr(A),complete=FALSE)
[,1]
2018 Jan 22
2
Inconsistent rank in qr()
Hi,
I have noticed different rank values calculated by qr() depending on
LAPACK parameter. When it is FALSE (default) a true rank is estimated and returned.
Unfortunately, when LAPACK is set to TRUE, the min(nrow(A), ncol(A)) is returned
which is only occasionally a true rank.
Would not it be more consistent to replace the rank in the latter case by something
based on the following pseudo code ?
2016 Oct 24
3
typo or stale info in qr man
man for `qr` says that the function uses LINPACK's DQRDC, while it in
fact uses DQRDC2.
```
The QR decomposition of the matrix as computed by LINPACK or LAPACK.
The components in the returned value correspond directly to the values
returned by DQRDC/DGEQP3/ZGEQP3
```
2012 Sep 07
1
Need to tell R CMD check that a function qr.R is not a method
When creating a package, I would like a way to tell R that
a function with a period in its name is not a method.
I'm writing a package now with a modified version of qr.R.
R CMD check gives warnings:
* checking S3 generic/method consistency ... WARNING
qr:
function(x, ...)
qr.R:
function(qr, complete, pivot)
See section ‘Generic functions and methods’ of the ‘Writing R
Extensions’
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:
2010 Feb 17
2
qr test?
I am testing 'qr' with an admittedly contrived matrix and I am getting different results than I am from another package. The matrix that I am using is:
x <- matrix(seq(.1, by=.1, length.out=12), 4)
So the whole test is:
x <- matrix(seq(.1, by=.1, length.out=12), 4)
qr(x)
And the output from 'R' is:
$qr
[,1] [,2] [,3]
[1,] -0.5477226 -1.2780193
2017 Jun 22
2
Unexpected behaviour of base::qr()$rank
2017-06-22 19:49 GMT+02:00 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
> On 22.06.2017 17:11, Bernd Funovits wrote:
>>
>> Hello,
>>
>> I experienced some unexpected behaviour while determining the rank of matrices (sometimes 1x1 matrices):
>> base::qr(matrix(1e-20))$rank returns 1 (incorrect)
>> base::qr(diag(c(1, 1e-20)))$rank returns 2
2007 May 01
1
(PR#9623) qr.coef: permutes dimnames; inserts NA; promises
On Thu, 19 Apr 2007, brech at delphioutpost.com wrote:
> Full_Name: Christian Brechbuehler
> Version: 2.4.1 Patched (2007-03-25 r40917)
> OS: Linux 2.6.15-27-adm64-xeon; Ubuntu 6.06.1 LTS
> Submission from: (NULL) (24.61.47.236)
>
>
> Splus and R have different ideas about what qr.coef(qr()) should return,
> which is fine... but I believe that R has a bug in that it is not
2003 Jun 26
3
lm diagnostics and qr (fwd)
I have been struggling to find some informaation on what lm exactly does.
I know it uses the QR decomp. However, I was recently faced with a
somewhat badly scaled matrix and summary(lm) said
Coefficients: ( 4 not defined because of singularities)
does anyone know how lm chooses these 4 coef. is it forward building of
the model --> drop last when qr sends a non full rank design matrix?
My
2017 Jun 22
2
Unexpected behaviour of base::qr()$rank
Hello,
I experienced some unexpected behaviour while determining the rank of
matrices (sometimes 1x1 matrices):
base::qr(matrix(1e-20))$rank returns 1 (incorrect)
base::qr(diag(c(1, 1e-20)))$rank returns 2 (incorrect)
Best regards,
Bernd
> R.version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major