Lily | 1 Sep 2003 03:06
Picon
Favicon

[R] help for performing regressions based on combination of predictors

Dear All,

I would like to perform linear regressions based on Y
and all of the combinations of the five predictors,
i.e.,(y,x1,x2),(y,x1,x3),....,(y,x1,x2,x4,x5),....,(y,x1,x2,x3,x4,x5).

Is there any quick way to do it instead of repeat
performing regressions for 31 times? Or, is there 
any method to manipulate the dataset into the 31
combinations?

Thanks for your help!

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Paul Y. Peng | 1 Sep 2003 03:58
Picon
Picon
Favicon

Re: [R] Shared library loading in Win R 1071 and previous Win Rversions

Many thanks to Brian and Uwe for their replies. After some changes
and recompilation, my dll library now works with R1.7.1. I think
the problem was caused by the change in R1.7.1 on calling log1p C
function from users' C programs. The answer to my another question
is that the older binary versions than rw1070 for Windows are not
available in CRAN.

Paul.

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Lily | 1 Sep 2003 03:57
Picon
Favicon

Re: [R] help for performing regressions based on combination of predictors

Thanks! However, what I mean is performing 31
regressions based on the combinations of the
predictors. I don't consider interaction in 
this case. So, the regressions are like
lm(y~x1+x2) or lm(Y~x1+x2+x3),or lm(y~x1+x2+x4)
...etc.

--- Patrick Connolly <p.connolly <at> hortresearch.co.nz>
wrote:
> On Sun, 31-Aug-2003 at 06:06PM -0700, Lily wrote:
> 
> |> Dear All,
> |> 
> |> I would like to perform linear regressions based
> on Y
> |> and all of the combinations of the five
> predictors,
> |>
>
i.e.,(y,x1,x2),(y,x1,x3),....,(y,x1,x2,x4,x5),....,(y,x1,x2,x3,x4,x5).
> |> 
> |> Is there any quick way to do it instead of repeat
> |> performing regressions for 31 times? Or, is there
> 
> |> any method to manipulate the dataset into the 31
> |> combinations?
> 
> Probably, but it's simpler to put them all in the
> formula:
> 
(Continue reading)

Picon

Re: [R] help for performing regressions based on combination of predictors

On 31 Aug 2003 at 18:06, Lily wrote:

Have you tried 
library(leaps)
library(help=leaps)
?

Kjetil Halvorsen

> Dear All,
> 
> I would like to perform linear regressions based on Y
> and all of the combinations of the five predictors,
> i.e.,(y,x1,x2),(y,x1,x3),....,(y,x1,x2,x4,x5),....,(y,x1,x2,x3,x4,x5).
> 
> Is there any quick way to do it instead of repeat
> performing regressions for 31 times? Or, is there 
> any method to manipulate the dataset into the 31
> combinations?
> 
> Thanks for your help!
> 
> ______________________________________________
> R-help <at> stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

(Continue reading)

Richard A. O'Keefe | 1 Sep 2003 04:49
Picon
Favicon

Re: [R] difference between <- and =

Levi Larkey <larkey <at> mail.utexas.edu> wrote:

a perfect illustration of why allowing "=" as an alternative
spelling for "<-" was always an obviously really bad idea.

	Is there any reason for using one operator over the other outside of 
	function definitions and calls?

You should never use "=" for assignment unless you are suffering such
severe "C" withdrawal symptoms that the doctor just had to give you a
shot to calm you down.  It is best to keep different symbols for
different purposes.  (I note that Ada uses ":=" for assignment and
"=>" for keyword arguments.)

Something that would be quite useful would be an option asking R to
warn you
    - if you have any assignment operator in a function argument
      (thanks to lazy evaluation this probably *won't* do what you
      expect)
    - if you have "=" anywhere except for binding a name to an argument.
Perhaps these could be two options.

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

rab | 1 Sep 2003 07:12

[R] Illegal instruction - R 1.7.1 under RH 9 Intel

I installed R 1.7.1 on my intel desktop (RH 9) without any problems.  I 
installed the same binary (R-1.7.1-1.i386.rpm) on my Toshiba Satellite 
2535cds (RH 9). R starts as usual all the way to how to quit then prints:

Illegal instruction

and exits to the shell prompt. I also had installed the patched readline 
rpm.

How can I fix this? I've never had a problem running R before on the laptop.

Rick B.

______________________________________________
R-help <at> stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Prof Brian Ripley | 1 Sep 2003 08:36
Picon
Picon
Favicon

Re: [R] Illegal instruction - R 1.7.1 under RH 9 Intel

We've seen things like this on RH, and it boiled down to the exact state
of the updates on different systems.  Indeed, we currently have a
situation that R compiled on server A will crash on one of servers B or C,
for any choice of A amongst the three servers.  (Fortunately R compiled on
D works on all of A B C.)  All the machines concerned are dual PIIIs.

We are in the process of ensuring that all our machines are patched with
exactly the same update rpms, but that is probably not the whole story as
we have encountered problems between single-processor P4 and
dual-processor PIII machines (obviously running different kernels, at the
same patch level).  (It's also a problem with 100 odd machines, many of 
which are dual-boot and rarely in Linux.)

I can only suggest you build R from the sources yourself on the laptop, 
unless Martyn has a better idea.

On Mon, 1 Sep 2003, rab wrote:

> I installed R 1.7.1 on my intel desktop (RH 9) without any problems.  I 
> installed the same binary (R-1.7.1-1.i386.rpm) on my Toshiba Satellite 
> 2535cds (RH 9). R starts as usual all the way to how to quit then prints:
> 
> Illegal instruction
> 
> and exits to the shell prompt. I also had installed the patched readline 
> rpm.
> 
> How can I fix this? I've never had a problem running R before on the laptop.

--

-- 
(Continue reading)

Peter Dalgaard BSA | 1 Sep 2003 09:06
Picon
Favicon

Re: [R] Illegal instruction - R 1.7.1 under RH 9 Intel

rab <rab <at> nauticom.net> writes:

> I installed R 1.7.1 on my intel desktop (RH 9) without any problems.
> I installed the same binary (R-1.7.1-1.i386.rpm) on my Toshiba
> Satellite 2535cds (RH 9). R starts as usual all the way to how to quit
> then prints:
> 
> Illegal instruction
> 
> and exits to the shell prompt. I also had installed the patched
> readline rpm.
> 
> How can I fix this? I've never had a problem running R before on the laptop.

Couple of questions which might help us get closer to the source of
the trouble:

Does it happen if you turn off readline processing? (R --no-readline)
If so, and if you're not running the KDE konsole, you might want to
try downgrading readline to the original version. Apart from that,
could you try running under the debugger (R -d gdb) and tell us where
the crash is coming from?

--

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard <at> biostat.ku.dk)             FAX: (+45) 35327907

______________________________________________
(Continue reading)

Spencer Graves | 1 Sep 2003 11:57

Re: [R] difference between <- and =

	  A common, punishing error for me, with DF being a data frame, is the 
following:

	  if(DF$a = 1) ...

	  where I intended to write "if(DF$a == 1)...".  This error first 
replaces column "a" of DF with the trivial vector 1 (of length 1), and 
then interprets that as a logical, which evaluates as TRUE.  Unless the 
"if" statement otherwise generates an error, I must restore column "a" 
from somewhere before I can continue.

	   In addition to specifying function arguments, I also use "=" to 
specify named components of a list or a vector.  That works fine for me. 
  It's only the accidental use of "=" when I mean "==" that creates 
problems.

Best Wishes,
Spencer Graves

Richard A. O'Keefe wrote:
> Levi Larkey <larkey <at> mail.utexas.edu> wrote:
> 
> a perfect illustration of why allowing "=" as an alternative
> spelling for "<-" was always an obviously really bad idea.
> 
> 	Is there any reason for using one operator over the other outside of 
> 	function definitions and calls?
> 
> You should never use "=" for assignment unless you are suffering such
> severe "C" withdrawal symptoms that the doctor just had to give you a
(Continue reading)

Peter Dalgaard BSA | 1 Sep 2003 12:24
Picon
Favicon

Re: [R] difference between <- and =

Spencer Graves <spencer.graves <at> pdf.com> writes:

> 	  A common, punishing error for me, with DF being a data
> frame, is the following:
> 
> 	  if(DF$a = 1) ...
> 
> 	  where I intended to write "if(DF$a == 1)...".  This error
> first replaces column "a" of DF with the trivial vector 1 (of length
> 1), and then interprets that as a logical, which evaluates as TRUE.
> Unless the "if" statement otherwise generates an error, I must restore
> column "a" from somewhere before I can continue.

Eh?

> a <- list(x=2)
> if (a$x = 1) 5
Error: syntax error

I think you're referring to another R-like language....

 
> 	   In addition to specifying function arguments, I also use
> "=" to specify named components of a list or a vector.  That works
> fine for me. It's only the accidental use of "=" when I mean "==" that
> creates problems.

(Actually, that's the same thing. list() and c() are function calls like
(almost) everything else.)

(Continue reading)


Gmane