R crashes on quantreg

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

R crashes on quantreg

T Mu
I was trying "quantreg" package,

lm1 <- lm(y~x)
rq1 <- rq(y~x)
plot(summary(rq1)) #then got a warning says singular value, etc. but this
line can be omited
plot(lm1) #crash here

It happened every time on my PC, Windows XP Pro Serv. Pack 1, Pentium(4)
3.00G.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

T Mu
I forgot to mention my R version is 2.3.1 and quantreg is the most updated
too.

On 6/7/06, Mu Tian <[hidden email]> wrote:

>
>  I was trying "quantreg" package,
>
> lm1 <- lm(y~x)
> rq1 <- rq(y~x)
> plot(summary(rq1)) #then got a warning says singular value, etc. but this
> line can be omited
> plot(lm1) #crash here
>
> It happened every time on my PC, Windows XP Pro Serv. Pack 1, Pentium(4)
> 3.00G.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

RKoenker
In reply to this post by T Mu
Since the "crash" occurs plotting the lm object it is unclear what
this has to do with quantreg, but maybe you could explain

        1.  what you mean by crash,
        2.  something about x,y,
       
This is best addressed to the maintainer of the package rather than to
R-help, provided, of course, that it is really a question about  
quantreg.

url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    [hidden email]            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Champaign, IL 61820


On Jun 7, 2006, at 2:32 PM, Mu Tian wrote:

> I was trying "quantreg" package,
>
> lm1 <- lm(y~x)
> rq1 <- rq(y~x)
> plot(summary(rq1)) #then got a warning says singular value, etc.  
> but this
> line can be omited
> plot(lm1) #crash here
>
> It happened every time on my PC, Windows XP Pro Serv. Pack 1,  
> Pentium(4)
> 3.00G.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting- 
> guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

Brian Ripley
In reply to this post by T Mu
Without y and x we cannot reproduce this.

PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

On Wed, 7 Jun 2006, Mu Tian wrote:

> I forgot to mention my R version is 2.3.1 and quantreg is the most updated
> too.

It has a version number, which the posting guide tells you how to find.

> On 6/7/06, Mu Tian <[hidden email]> wrote:
>>
>>  I was trying "quantreg" package,
>>
>> lm1 <- lm(y~x)
>> rq1 <- rq(y~x)
>> plot(summary(rq1)) #then got a warning says singular value, etc. but this
>> line can be omited
>> plot(lm1) #crash here
>>
>> It happened every time on my PC, Windows XP Pro Serv. Pack 1, Pentium(4)
>> 3.00G.
>>
>
> [[alternative HTML version deleted]]



--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

T Mu
I attached the data file here. I restarted the PC but it still happens. It
says a memory address could not be written. I am not sure it is a problem of
R or quantreg but I plot without problems before I load quantreg.

Thank you.

Tian

On 6/7/06, Prof Brian Ripley <[hidden email]> wrote:

>
> Without y and x we cannot reproduce this.
>
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html
>
> On Wed, 7 Jun 2006, Mu Tian wrote:
>
> > I forgot to mention my R version is 2.3.1 and quantreg is the most
> updated
> > too.
>
> It has a version number, which the posting guide tells you how to find.
>
> > On 6/7/06, Mu Tian <[hidden email]> wrote:
> >>
> >>  I was trying "quantreg" package,
> >>
> >> lm1 <- lm(y~x)
> >> rq1 <- rq(y~x)
> >> plot(summary(rq1)) #then got a warning says singular value, etc. but
> this
> >> line can be omited
> >> plot(lm1) #crash here
> >>
> >> It happened every time on my PC, Windows XP Pro Serv. Pack 1,
> Pentium(4)
> >> 3.00G.
> >>
> >
> >       [[alternative HTML version deleted]]
>
>
>
> --
> Brian D. Ripley,                  [hidden email]
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

Brian Ripley
In reply to this post by RKoenker
On Wed, 7 Jun 2006, roger koenker wrote:

> Since the "crash" occurs plotting the lm object it is unclear what
> this has to do with quantreg, but maybe you could explain
>
> 1.  what you mean by crash,
> 2.  something about x,y,
>
> This is best addressed to the maintainer of the package rather than to
> R-help, provided, of course, that it is really a question about
> quantreg.

Agreed, but just so R-help knows how to solve such problems, I ran this
under valgrind (see `Writing R Extensions') and got

> rq1 <- rq(y~x)
==7870== Invalid write of size 8
==7870==    at 0x9ED8BDE: rqbr_ (rqbr.f:309)
...
==7870==  Address 0x92162A0 is 12,248 bytes inside a block of size 12,288 free'd
==7870==    at 0x49055DD: free (vg_replace_malloc.c:235)
==7870==    by 0x53D64A: build_trtable (regex.c:9618)
==7870==    by 0x53AEB4: transit_state (regex.c:8393)
==7870==    by 0x538977: check_matching (regex.c:7318)
==7870==    by 0x537E89: re_search_internal (regex.c:7007)
==7870==    by 0x53EF3D: Rregexec (regex.c:10440)
==7870==    by 0x438AAF: do_gsub (character.c:1127)

and it seems object lm1 has been trashed and you soon get a segfault.

--
Brian D. Ripley,                  [hidden email]
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: R crashes on quantreg

RKoenker
In reply to this post by T Mu
R-help doesn't  foward attached data files like this, but Brian
kindly forwarded it to me.

You need to restrict X so that it is full rank,  it now has
rank 19 and column dimension 29 (with intercept).  See
for example svd(cbind(1,x)).

I'll add some better checking for this, but it will basically amount
to setting singular.ok = FALSE in lm() and forcings users to do
the rank reduction themselves.


url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    [hidden email]            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Champaign, IL 61820


On Jun 7, 2006, at 3:05 PM, Mu Tian wrote:

> I attached the data file here. I restarted the PC but it still  
> happens. It
> says a memory address could not be written. I am not sure it is a  
> problem of
> R or quantreg but I plot without problems before I load quantreg.
>
> Thank you.
>
> Tian
>
> On 6/7/06, Prof Brian Ripley <[hidden email]> wrote:
>>
>> Without y and x we cannot reproduce this.
>>
>> PLEASE do read the posting guide!
>> http://www.R-project.org/posting-guide.html
>>
>> On Wed, 7 Jun 2006, Mu Tian wrote:
>>
>> > I forgot to mention my R version is 2.3.1 and quantreg is the most
>> updated
>> > too.
>>
>> It has a version number, which the posting guide tells you how to  
>> find.
>>
>> > On 6/7/06, Mu Tian <[hidden email]> wrote:
>> >>
>> >>  I was trying "quantreg" package,
>> >>
>> >> lm1 <- lm(y~x)
>> >> rq1 <- rq(y~x)
>> >> plot(summary(rq1)) #then got a warning says singular value,  
>> etc. but
>> this
>> >> line can be omited
>> >> plot(lm1) #crash here
>> >>
>> >> It happened every time on my PC, Windows XP Pro Serv. Pack 1,
>> Pentium(4)
>> >> 3.00G.
>> >>
>> >
>> >       [[alternative HTML version deleted]]
>>
>>
>>
>> --
>> Brian D. Ripley,                  [hidden email]
>> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
>> University of Oxford,             Tel:  +44 1865 272861 (self)
>> 1 South Parks Road,                     +44 1865 272866 (PA)
>> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
>>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting- 
> guide.html

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html