Displaying 20 results from an estimated 5000 matches similar to: "random sampling steps in R"
2011 Mar 10
3
Fw: random sampling steps in R with replacement
Please note is with replacement
From: taby gathoni <tabieg@yahoo.com>
To: R help <r-help@r-project.org>
Sent: Thursday, March 10, 2011 11:53 AM
Subject: [R] random sampling steps in R
Dear all,
Could someone assist me in random sampling steps/code in R? I have a main sample of 42 males and 165 females and I want to come up with about 1000 samples of 20 males and 20 females from
2011 Feb 07
2
problem in merging
Hi all,
I am having this error while trying to merge about 2 dataframes
m_merge = merge(m_accts,m_op, by.y="CUST_ID",by.x="FORACID",all.y=TRUE,all.x=TRUE)
Error: cannot allocate vector of size 10.0 Mb
Taby
[[alternative HTML version deleted]]
2011 Jan 03
1
personal details appearing on google such after I pose a question in the R-help forum
Hi all,
Out of curiosity I googled my name yesterday to just see what new information in the web there is associated with me. To my surprise, I found in addition to the questions i have posted on this forum, my email address and my signature details (name, address, telephone number) seem to appear everytime i pose a question. How can i conceal my personal details from the access of anyone when
2011 Mar 16
2
calculating AUCs for each of the 1000 boot strap samples
Hallo,
I modified a code given by Andrija, a contributor in the list to achieve two objectives:
create 1000 samples from a list of 207 samples with each of the samples cointaining 20 good and 20 bad. THis i have achievedcalcuate AUC each of the 1000 samples, this i get an error.
Please see the code below and assist me.
> data<-data.frame(id=1:(165+42),main_samp$SCORE,
2011 Jun 21
2
interaction between categorical variables
Dear R-users,
I need some assistance.
I am running some interactive variables for categorical variables.
I have dgen(2 levels converted to dummy variables) and dtoe(4-levels also converted to dummy variables). So I have worked with them in two ways:
i created a variable X1 = dgen*dtoe and I get an error "Error in dgen * dtoe : non-conformable arrays"then i run a glm, binomial
2010 Dec 20
1
transposing panel data
I am currently trying to transpose some large panel data set ie transposing multiple rows in into a single column. instead the transpose functionality transposes all rows into columns. my sample data set looks like below:
ACCT_NUM
ACCOUNT_NAME
TRAN_AMT
DATE
EMPLOYER
101913
GK
7489
30-Apr-10
PENSION
101913
GK
7489
30-May-10
PENSION
101913
2011 Apr 08
3
random sampling with levels and with replacement
Dear all,
i have a dataset of about 400 records , with a variable that has two levels 40 bad and 360 good among other variables,how do i come up with10 random samples that have the composition of as the main sample but maintaining the 40 bad 360 good with replacement, i recently discovered that my random samples generated dont maintain the ratio. My code is as :
mysample <-
2008 Feb 06
1
Nested ANOVA models in R
Hi,
I'm trying to work through a Nested ANOVA for the following scenario:
20 males were used to fertilize eggs of 4 females per male, so that
female is nested within male (80 females used total). Spine length
was measured on 11 offspring per family, resulting in 880
measurements on 80 families.
I used the following two commands:
summary(aov(Spinelength ~ Male*Female))
and
2012 Nov 05
1
Post hoc tests in gam (mgcv)
Hi.
I'm analysing some fish biological traits with a gam in mgcv. After several
tries, I got this model
log(tle) = sexcolor + s(doy, bs = "cc", by = sexcolor) +log(tl)
sexcolor is a factor with 4 levels
doy is "day of year", which is modeled as a smoother
tl is "total length of the fish"
The summary of this models is (only parametric coefficientes):
Parametric
2018 Jan 09
3
barplot_add=TRUE
Dear R users
aim
Barplot of insect trap catches (y variable trapcatch) at one specific station (variable FiBL_Hecke) from week 1-52 ( x variable week).
It works well using the function tapply (sum trapcatch per week, males and females not separated), however, I intend to separate the y variable trapcatch in males and females (variable m_w: m and w)
problem
I used the function "add" to
2011 Oct 11
1
warning with cut2 function
Dear r user,
please find my attached sample of the dataset i? am using to create a crosstable and eventually plot a histogram from the output.
I am using? the cut2 function to create bins, about 7 of them using the code after reading the data:
cluster <- cut2(cross_val$value, g=7)
I get the warning:
Warning message:
In min(xx[xx > upper]) : no non-missing arguments to min; returning Inf
2011 Feb 14
1
problem in installing Rattle in R 2.12.1.0
Hi all,
Please help,
I am getting an error when I try installing rattle.
Error in as.GType(type) : Cannot convert RGtkBuilder to GType
I have already installed
gtk-2.12.9-win32-2 and gtk2-runtime-2.22.0-2010-10-21-ash
and restarted R as instructions require.
Please assist me
Taby
[[alternative HTML version deleted]]
2011 Feb 15
1
quick question about binary data
Dear all,This is both an R and a statistics question. I want to test whether males and females of a given species tend to co-occur in a given sampling unit more frequently than expected by chance. I'm thinking about using a binomial distribution with p as the sex ratio of the entire population. So, even though the population sex ratio is close to 50:50, each sampling unit would have
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions.
I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region.
So is there a
2004 Aug 05
1
cross random effects (more information abuot the data)
Dear friends,
I have asked last few days about cross-random effects
using PQL, but I have not receive any answer because
might my question was not clear.
My question was about analysing the salamander mating
data using PQL. This data contain cross-random effects
for (male) and for (female). By opining MASS and lme
library. I wrote this code
sala.glmm <- glmmPQL(fixed=y~WSf*WSM,
2010 Mar 11
2
as.integer and indexes error
Hello All,
I would like to report the following bug or maybe you can explain if I am
wrong.
I am sampling from two different populations with weights. The two
populations have the same age groups and I want to distinguish where I am
sampling from. That is why I am using a matrix such as:
matrix
age.group Male Females Weight.Males Weight.Females
1 1.1
2012 Oct 05
1
Error in lmer: asMethod(object) : matrix is not symmetric [1, 2]
Dear R Users,
I am having trouble with lmer. I am looking at recombinant versus non
recombinant individuals. In the response variable recombinant
individuals are coded as 1's and non-recombinant as 0's. I built a model
with 2 fixed factors and 1 random effect. Sex (males/females) is the
first fixed effect and sexual genotype (XY, YY, WX and WY) the second
one. Sexual Genotype is
2018 Jan 09
0
barplot_add=TRUE
Hi, Sibylle,
since you write '"mathematically" add', does
barplot(rbind(m$trapcatch, w$trapcatch))
do what you want (modulo layout details)?
Hth -- Gerrit
---------------------------------------------------------------------
Dr. Gerrit Eichner Mathematical Institute, Room 212
gerrit.eichner at math.uni-giessen.de Justus-Liebig-University Giessen
Tel:
2006 Jul 18
1
Classification error rate increased by bagging - any ideas?
Hi,
I'm analysing some anthropometric data on fifty odd skull bases. We know the
gender of each skull, and we are trying to develop a predictor to identify
the
sex of unknown skulls.
Rpart with cross-validation produces two models - one of which predicts
gender
for Males well, and Females poorly, and the other does the opposite (Females
well, and Males poorly). In both cases the error
2004 May 16
1
Newbie Poisson regression question
Greetings.
I'm getting started learning R, and I'm trying to reproduce some models
I've done previously in SAS. I'm trying to fit simple Poisson
regressions, and I keep getting impossible results: the models predict
negative numbers of cases for many observations. The code for the
models are:
Female.model <- glm(Observed ~ Black + Other, family =
poisson(link=log),