Displaying 20 results from an estimated 600 matches similar to: "Fitted values with small weights in lm.wfit (PR#11979)"
2006 Jul 24
2
persistent C++ objects
Hi,
I am trying to create an R interface for Dynare++ [1], a k-order
solver for rational expectation models. I would like some advice on
how to glue the C++ code to R.
In C++, it works the following way:
- a DynareModelEq object is initialized with the formulas, parses them
and performs k-order symbolic expansions
- the user calls a member of this object multiple times with parameter
2012 Nov 07
2
Correct use of Depends, Imports and ::
Dear R developers,
Taking advantage of the yesterday discussion about the use of
Depends/Import/Suggests/Enhances, I would like to add a related question.
Let's assume, in the DESCRIPTION file of my package foo0, I have:
Depends: foo1
Imports: foo2
while in the NAMESPACE file of my package I have
importFrom("foo2", f2)
and within my package I use the following two external
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 *
1999 Mar 09
0
Bug in lm.wfit with zero weights in 0.63.3 (PR#136)
R 0.63.3 (any platform)
library(lqs)
example(lqs)
gives
Warning in (y - z$residuals) + offset : longer object length
is not a multiple of shorter object length
repeatedly. The problem is in lm.wfit, which removes cases with
zero weights, but does not adjust the offset. The fix is
z$fitted.values <- (y - z$residuals)
z$weights <- w
if (zero.weights) {
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 *
2017 Oct 24
0
Issue of reproducibility with gam and lm.wfit in different versions of R
Dear R users,
I recently stumbled upon problems of reproducibility while running GAM analyses in different R and gam package versions. In the example below, a small dataset is created in which the y and x1 variables are 100% correlated. The intents of this example were primarily for regression testing and, secondarily, to evaluate how the gam algorithm behaves under extreme/limit conditions.
I
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 <-
>
2013 Apr 23
2
Help: Where can I find the code for 'C_Cdqrls'?
Dear all,
I’m not sure if it is O.K. to ask this question here.
But where can I find the code for the function ‘C_Cdqrls’ which is called by the R function ‘lsfit‘.
Thank you all.
Sorry for being naïve if so.
--------------------
Ziqiang Zhao
2013-04-23
[[alternative HTML version deleted]]
2004 Oct 28
2
Weighted regresion using lm
Hi:
Could anyone help me to clarify this: are the weights normalized inside lm
function (package:stats) before applied to the error term? For example:
>lm (cost ~ material, weights=quatity, data=receipt)
will lm normalize quatity such that sum(quatity) = 1? I traced to lm.wfit and
then the weights get transferred into a precompiled FORTRAN module so I can't
figure out. Thanks!
2005 Mar 24
1
Robust multivariate regression with rlm
Dear Group,
I am having trouble with using rlm on multivariate data sets. When I
call rlm I get
Error in lm.wfit(x, y, w, method = "qr") :
incompatible dimensions
lm on the same data sets seem to work well (see code example). Am I
doing something wrong?
I have already browsed through the forums and google but could not find
any related discussions.
I use Windows XP and R
2005 Sep 20
2
Error report upon using the help.search( ) command (PR#8144)
Full_Name: P?l Trosvik
Version: 2.0.1
OS: Windows XP
Submission from: (NULL) (129.240.91.220)
Hi
Upon entering the command: help.search("linear") .I get the following error
report:
Error in rbind(...) : number of columns of matrices must match (see arg 8)
I get the same error message whichever search term I enter between the quotation
marks. This function was working fine just a few
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]
2002 Jun 26
3
Bug or failing understanding?
Hola!
I seem to remember i used to have the same name of argument and default
value in argument list to functions, but (rw1.5.1) this seems not to
work:
> x <- 3
> test <- function(x=x) x*x
> test(7)
[1] 49
> test()
Error in test() : recursive default argument reference
here is a code fragment from lm() using the same syntax:
else {
x <- model.matrix(mt, mf,
2007 Oct 12
3
no visible binding
Could someone advise me about how to react to the message:
* checking R code for possible problems ... NOTE
slm: no visible binding for global variable 'response'
from R CMD check SparseM with
* using R version 2.6.0 Under development (unstable) (2007-09-03 r42749)
The offending code looks like this:
"slm" <-
function (formula, data, weights, na.action, method =
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
2010 May 26
2
Survival analysis extrapolation
Dear all,
I'm trying to fit a curve to some 1 year failure-time data, so that I can
extrapolate and predict failure rates up to 3 years. The data is in the
general form:
Treatment Time Status
Treatment A 28 0
Treatment B 28 0
Treatment B 28 0
Treatment A 28
2010 Dec 13
1
How does R compute sums of squares?
Consider the following missing data problem:
y = c(1, 2, 2, 2, 3)
a = factor(c(1, 1, 1, 2, 2))
b = factor(c(1, 2, 3, 1, 2))
fit = lm(y ~ a + b)
anova(fit)
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
a 1 0.83333 0.83333 1.3637e+33 < 2.2e-16 ***
b 2 1.16667 0.58333 9.5461e+32 < 2.2e-16 ***
Residuals 1 0.00000 0.00000
---
2010 Jan 12
1
Problems with betareg()
Hi,
In using the betareg package, I encounter the following error message:
Error in lm.wfit(x, linkfun(y), weights, offset = offset) :
NA/NaN/Inf in foreign function call (arg 4)
Any help will be most appreciated. Thanks in advance.
Alex
2007 Jan 30
1
SparseM and Stepwise Problem
I'm trying to use stepAIC on sparse matrices, and I need some help.
The documentation for slm.fit suggests:
slm.fit and slm.wfit call slm.fit.csr to do Cholesky decomposition and then
backsolve to obtain the least squares estimated coefficients. These functions can be
called directly if the user is willing to specify the design matrix in matrix.csr form.
This is often advantageous in large
2001 Dec 13
1
Error when library() called with no arguments (PR#1215)
Full_Name: Roger peng
Version: 1.4.0 (2001-12-13)
OS: GNU/Linux (Redhat 7.1)
Submission from: (NULL) (128.97.86.126)
R compiles fine and runs, but when I call the library() function with no
arguments I get the error:
> library()
Error in FUN(X[[2]], ...) : subscript out of bounds
make check also fails when running code in base-Ex.R (I'm assuming it fails
where library() function is