Displaying 20 results from an estimated 30000 matches similar to: "all possible subsets of r out of n"
2001 Nov 20
3
Sampling from a population
Hi ALL:
Suppose you have a population of N <- 5 observations, x <- c(43, 28, 7, 61, 39). From that you can draw a maximum of 10 samples without replacement of size n <- 3. (Command choose(N,n) yields 10). For instance the samples I seek are
43, 61, 7
39, 7, 28 ...etc
How can I get R to do that for me, to get an exhaustive list of samples of size n drawn without replacement
2003 Sep 17
3
all possible samples
Dear all, there is an R function that return all possible samples of size n,
with replacement, from a vector of length N ?
Best regards
2004 Sep 28
4
An index of all possible combinations of variables in a data fram e
Hello list
Does anybody know of any way to create an index of all the possible
combinations of variables (factors) in a data frame? ie for 3 factors A, B &
C we have
A
B
C
AB
AC
BC
ABC
which equates to columns 1, 2, 3, 1:2, (1,3), 2:3 and 1:3.
I realise that a function like model.matrix does this, but how to get the
seqence of the index?
Any help would be greatly appreciated.
2000 Jun 23
1
Errors in Compiling R
I am having trouble compiling R-1.1.0 on a Sun Ultra 60 machine
running Solaris 7. Suggestions are greatly appreciated.
I modified the CPPFLAGS and LIBS variables in the config.site file.
As far as I can tell, I have included all the non-standard headers
and libraries installed on my Sun station. My GNU stuff is installed
in /opt/Summertime_98.sparc/, and at the bottom of this
message I
2009 Sep 01
2
Function for all 2^N subsets of N
Greetings all!
I have been searching the Site for a function, say "subsets",
such that for instance
subsets(10)
would return a (say) matrix of indices to the 2^10 subsets of
N items -- perhaps in the form of 2^10 rows each of which is
10 entries each either TRUE or FALSE. Or 1 or 0. Or ...
I can of course write my own, using good old looping technology
or similar, but it would be
2006 Jan 03
1
All possible subsets model selection using AICc
Hello List,
I was wondering if a package or piece of code exists that will allow all
possible subsets regression model selection within program R. I have
already looked at step(AIC) which does not test differing combinations
of variables within a model as far as I can tell. In addition I tried
to use the leaps command, but that does not use the criterion I am
looking for. Any help or advice
2009 Mar 13
2
code to find all distinct subsets of size r from a set of size n
I'm doing a permutation test and need to efficiently generate all
distinct subsets of size r from a set of size n. P 138 of MASS (4th
ed) notes that "The code to generate this efficiently is in the
scripts". I was unable to find this code on quick inspection of the
\library\MASS\scripts file for Chapter 5 and 'subsets' is not a
function in MASS.
I did find this problem is
2002 Sep 23
3
New version of gregmisc package
Version 0.6.0 of the gregmisc package has just been released on CRAN.
Description:
===========
Package: gregmisc
Description: Misc Functions written/maintained by Gregory R. Warnes
Title: Greg's Miscellaneous Functions
Version: 0.6.0
Date: 2002/09/23
Maintainer: Gregory R. Warnes <Gregory_R_Warnes at groton.pfizer.com>
Author: Gregory R. Warnes. Includes code provided by Ben
2002 Sep 23
3
New version of gregmisc package
Version 0.6.0 of the gregmisc package has just been released on CRAN.
Description:
===========
Package: gregmisc
Description: Misc Functions written/maintained by Gregory R. Warnes
Title: Greg's Miscellaneous Functions
Version: 0.6.0
Date: 2002/09/23
Maintainer: Gregory R. Warnes <Gregory_R_Warnes at groton.pfizer.com>
Author: Gregory R. Warnes. Includes code provided by Ben
2003 Feb 12
2
rl_callback_read_char error on Solaris 7
This question is about compiling R-1.6.2 from source on a
Sparcstation-20 machine running Solaris 7, gcc-2.95.3 and
readline-4.2 (both gcc and readline from sunfreeware.com).
I searched the r-help archive and the FAQ. The errors seem to be
related to the binary readline libraries, and I have
/usr/local/lib/libreadline.a,libreadline.so@, and
libreadline.so.4.
The attached errors are from
2002 Oct 03
1
install.packages("grid") failed
I just successfully compiled R-1.6.0 on a Red Hat 7.2 machine. When I
tried to install "grid" from source, I got this error. Any
suggestions? I don't think it is a dependency problem. I also attach
the output from library().
Yuelin Li.
-------------
> install.packages("grid")
trying URL `http://cran.r-project.org/src/contrib/PACKAGES'
Content type
2010 Feb 12
1
all possible subsets, with AIC
Hello,
I have a question about doing ALL possible subsets regression
with a general linear model. My goal is to produce cumulative Akaike
weights for each of 7 predictor variables-to obtain this I need R to:
1.
Show me ALL possible subsets, not just the best possible subsets
2. Give
me an AIC value for each model (instead of a BIC value).
I have tried to
do this in library(RcmdrPlugin.HH),
2008 Apr 08
3
post hoc statistical power
I remember reading about post hoc statistical power on R-help. But I
can't seem to find them with RSiteSearch("post hoc statistical power")
and variations of it.
I would like to learn more about post hoc statistical power, its
meaningfulness, advantages and disadvantages. I thought the issue was
settled after Tukey's 1993 paper about post hoc statistical power
being
2007 Aug 11
1
xyplot() with segments() superposed?
In the hypothetical example below, how do I add two segments() into
the two panels, respectively? Say segments(x0=5, y0=10, x1=5, y1=20)
on the left and segments(x0=15, y0=-10, x1=15, y1=-2) on the right?
Many thanks in advance,
Yuelin Li.
ps. part of the code came from a solution given by Deepayan Sarkar.
-------------------
library(lattice)
set.seed(12345)
x <- 0:20
y.male.obs <- - 1.2
2002 May 16
1
glm(y ~ -1 + c, "binomial") question
This is a question about removing the intercept in a binomial
glm() model with categorical predictors. V&R (3rd Ed. Ch7) and
Chambers & Hastie (1993) were very helpful but I wasn't sure I
got all the answers.
In a simplistic example suppose I want to explore how disability
(3 levels, profound, severe, and mild) affects the dichotomized
outcome. The glm1 model (see below) is
2008 Jul 07
2
Running "all possible subsets" of a GLM (binomial) model
I have spent a fair amount of time looking for a package that is automated
to run glm (binomial) regression models with all possible subsets of my
independent variables. Something akin to Lumley's "leaps" package, but can
be applied to glms, not just lms; or something similar to Stata's brute
force "tryem" function? If anyone can point me in the right direction I
2002 Oct 31
1
Re: gregmisc version 0.7.3 now available
Dear Greg,
Thanks for the new release. The decomposition of the SSQ is just what I need!
Regards,
Martin.
Martin Hoyle,
School of Life and Environmental Sciences,
University of Nottingham,
University Park,
Nottingham,
NG7 2RD,
UK
Webpage: http://myprofile.cos.com/martinhoyle
>>> gregory_r_warnes at groton.pfizer.com 10/30/02 07:16PM >>>
Version 0.7.3 of the gregmisc package
2009 Mar 14
2
permutations in R
Hi. Does anyone know of a function which will take as input a number n (or a
set of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no repeats.
For example if n is 3, I would want a function which I could use in a loop
and the first time
2007 Nov 25
1
Constructin a call of function including permutation of column names - how to escape parentheses?
Dear R-users,
I would like to construct a list of arguments for a function in a format
function (list(item1=c("A","B"), item2=c("B","C")), item3=...):
The individual vectors in the list are permutations of colnames of a
dataframe.
The trouble is that I am not able to handle escaping of parentheses
correctly.
I was trying the following:
library(gregmisc)
2011 Mar 10
1
power for repeated-measures ANOVA lacking sphericity
Is there a function that calculates the power of a
repeated-measure ANOVA design, e.g., 2 groups, 4
within-subject factors, an average 0.40 correlation between
the 4 within factors, etc.
I don't think I can use power.anova.test() because it does
not consider corr=0.40.
I am hoping that someone has already implemented the method
by Muller & Barton (1989, JASA 84: 549-555) on how to