Displaying 20 results from an estimated 1440 matches for "sex".
Did you mean:
set
2009 Nov 12
1
XML: Reading transition matrices into R
...Maybe somebody had a similar problem
or know the code of the top of his or her head.
Any help appreciated.
Thanks and best,
Stefan
<?xml version="1.0" encoding="UTF-8" standalone="no"?><transitionmatrix>
<transition><age>0</age><sex>0</sex><from>1</from><to>1</to><percent>99.99999</percent></transition><transition><age>0</age><sex>0</sex><from>1</from><to>2</to><percent>0.0</percent></transition><transi...
2012 Jun 30
2
Significance of interaction depends on factor reference level - lmer/AIC model averaging
...and assess how isotope values (which indicate diet)
vary within a population of animals.
I have multiple measures from individuals (variable 'Tattoo') and multiple
individuals within social groups within 4 locations (A, B, C ,D) crucially I
am interested if there are differences between sexes and age classes
(variable AGECAT2) and whether this differs with location.
However, whether or not I get a significant sex:location interaction depends
on which location is my reference level and I cannot understand why this is
the case. It seems to be due to the fact that the standard error ass...
2010 Aug 23
3
extracting p-values from Anova objects (from the car library)
...e car library? I can't seem to locate the p-values using
str(result) or str(summary(result)) in the example below
> A <- factor( rep(1:2,each=3) )
> B <- factor( rep(1:3,times=2) )
> idata <- data.frame(A,B)
> fit <- lm( cbind(a1_b1,a1_b2,a1_b3,a2_b1,a2_b2,a2_b3) ? sex,
data=Data.wide)
> result <- Anova(fit, type="III", test="Wilks", idata=idata, idesign=?A*B)
Any help would be much appreciated!
Many thanks,
Johan
2004 Feb 29
7
Proportions again
Hello.
I asked before and it was great, cause as a beginner I learned a lot. But, if I have this in R (1 and 2 are codes for sex):
> sex<-c(1,2,2,1,1,2,2,2)
> sex
[1] 1 2 2 1 1 2 2 2
I´d like to obtain the proportion according to sex.So I type:
> prop.table(sex)
[1] 0.07692308 0.15384615 0.15384615 0.07692308 0.07692308 0.15384615 0.15384615
[8] 0.15384615
The result is OK, but I expected to see a simple freq...
2012 Dec 07
2
Assigning cases to groupings based on the values of several variables
...ewer lines, so it seems to me more
efficient.
Can you please tell me:
1. Which of my methods is more efficient?
2. Is there maybe an even more efficient r-like way of doing it?
Imagine - "mydata" is actually a very tall data frame.
Thanks a lot!
Dimitri
### My Data:
mydata<-data.frame(sex=rep(c(rep("m",4),rep("f",4)),2),age=rep(c(1:4,1:4),2))
(mydata)
### My desired assignments (in column "mygroup")
groupings<-data.frame(sex=c(rep("m",4),rep("f",4)),age=c(1:4,1:4),mygroup=1:8)
(groupings)
# No, I don't need a solution where...
2010 Jul 31
3
I have a problem
dear£º
in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) +
(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))).
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 2...
2000 Aug 01
0
anova() on three or more objects behaves inconsistently (PR#621)
...s of the pairwise
differences between the models, considered sequentially
from first to last.
neither of which are clear enough to disambiguate this.
Example:
library(MASS)
data(quine)
quine.hi <- aov(log(Days + 2.5) ~ .^4, quine)
quine.nxt <- update(quine.hi, . ~ . - Eth:Sex:Age:Lrn)
quine.lo <- aov(log(Days+2.5) ~ 1, quine)
anova(quine.hi, quine.nxt, quine.lo)
quine.hi1 <- glm(log(Days + 2.5) ~ .^4, data=quine)
quine.nxt1 <- update(quine.hi1, . ~ . - Eth:Sex:Age:Lrn)
quine.lo1 <- glm(log(Days+2.5) ~ 1, data=quine)
anova(quine.hi1, quine.nxt1, quine.lo1, t...
2004 May 21
1
Bug in update()? (PR#6902)
...e following while playing around with fitting log-linear
models to contingency tables using R 1.8.1, but the problem also
exists under R 1.9.0.
A reproducible example uses the following contingency table:
> library(MASS)
> data(quine)
> tmp <- with(quine, expand.grid(Eth=levels(Eth), Sex=levels(Sex),
+ Lrn=levels(Lrn), Age=levels(Age)))
> n <- nrow(quine)
> quine2 <- with(quine,
+ data.frame(tmp,
+ Count=as.vector(tapply(rep(1,n), list(Eth, Sex, Lrn, Age), sum))))
First fit a saturated model and see which term we can drop:
> fm &l...
2007 Jul 09
2
ANOVA: Does a Between-Subjects Factor belong in the Error Term?
I am executing a Repeated Measures Analysis of Variance with 1 DV (LOCOMOTOR
RESPONSE), 2 Within-Subjects Factors (AGE, ACOUSTIC CONDITION), and 1
Between-Subjects Factor (SEX).
Does anyone know whether the between-subjects factor (SEX) belongs in the
Error Term of the aov or not? And if it does belong, where in the Error Term
does it go? The 3 possible scenarios are listed below:
e.g.,
1. Omit Sex from the Error Term:
>My.aov = aov(Locomotor.Response~(Age*Acous...
2010 Sep 10
3
(no subject)
Hello,
I'm trying to do bar plot where 'sex' will be the category axis and
'occupation' will represent the bars and the clusters will represent
the mean 'income'.
sex occupation income
1 female j 12
2 male b 34
3 male j 22
4 female j...
2010 Jan 10
1
xmlToDataFrame#Help!!!#follow-up
...h comes from a rectangular data
array. I've been trying to play with parameters to the xmlToDataFrame
function
in the XML package but I dont get it to extract the data frame. Reading
the file with xmlTreeParse seems to work without error.
This is what the result should look like:
Name Sex Age Height Weight
1 Alfred M 14 69.0 112.5
2 Alice F 13 56.5 84.0
3 Barbara F 13 65.3 98.0
4 Carol F 14 62.8 102.5
5 Henry M 14 63.5 102.5
6 James M 12 57.3 83.0
7 Jane F 12 59.8 84.5
8 Janet F 15 62.5 112.5
9 Jeffrey M 1...
2013 Mar 09
2
quesion about lm function
Hi all:
My data is in the attachment.
I want to analysis the mean difference of y between 2 sex.
My code:
result_lm<-lm(y~factor(sex) + x1 + x2)
summary(result_lm)
The result of "factor(sex)m" 136.83, is the mean difference of y between 2 sex,and the corresponding p value is 0.07618.
My question is: how to get the mean y of sex(m) and sex(f) respectively via lm function?
M...
2003 Sep 30
0
lme vs. aov
...0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,
0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379)
treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2))
time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3))
sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M&...
2010 Apr 04
2
calculating an interaction statistic from stratified data
Dear R community,
I have data on beta&standard error (for the main effect of variable x),
stratified by sex for my dataset. I wish to calculate the sex-interaction
effect (as beta&se) from these two stratified datasets. Is there a package
to do this? If not, any advice how to do it manually?
Thank you very much and best regards, Georg.
************************
Georg Ehret, JHU, Baltimore
[[alternat...
2003 Oct 02
0
lme vs. aov with Error term
...-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379)
treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2))
time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3))
sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M&...
2003 Oct 01
0
lme vs. aov with Error term again
...-0.0923,0.32,0.08,0.0719,0.1017,0.05,-0.1727,-0.1332,0.15,0.304,-0.4093,0.2054,0.251,-0.1062,0.3833,0.0649,0.2908,0.1073,0.0919,0.1167,0.2369,0.306,0.1379)
treat<-as.factor(c(1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2))
time<-as.factor(c(1,1,1,1,2,2,2,2,3,3,3,3,1,1,1,1,2,2,2,2,3,3,3,3))
sex<-as.factor(c('F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M','F','F','M','M&...
2008 Feb 12
1
Finding LD50 from an interaction Generalised Linear model
Hi,
I have recently been attempting to find the LD50 from two predicted fits
(For male and females) in a Generalised linear model which models the effect
of both sex + logdose (and sex*logdose interaction) on proportion survival
(formula = y ~ ldose * sex, family = "binomial", data = dat (y is the
survival data)). I can obtain the LD50 for females using the dose.p()
command in the MASS library with dose.p(mod1,c(1,2)). However I cannot find
a way to d...
2007 Sep 02
2
NAs in indices
...ot allow missing values in their indices but vectors do.
Why is that? A search of the error message points out the problem and
solution but not why they differ. A simplified program that demonstrates
the issue is below.
Thanks,
Bob
# Here's a data frame that has both periods and NAs.
# I want sex to remain character for now.
sex=c("m","f",".",NA)
x=c(1,2,3,NA)
myDF <- data.frame(sex,x,stringsAsFactors=F)
rm(sex,x)
myDF
# Substituting NA into data frame does not work
# due to NAs in the indices. The error message is:
# missing values are not allowed in subs...
2011 Aug 17
3
Obtaining variable's names from a list of variables
Say I have a list of variables,
listVar <- list(age,sex)
I am looking for a way to either
1- create a vector c("age","sex") from it, or
2- get the names one by one in a for loop such as these
a) for (i in 1:length(listVar)) rownames(result)[i] <- ???
b) for(i in listVar) print (variable's name)
Any help much ap...
2008 Jan 29
5
pivot table in R
Hello,
I'm struggling with an elementary problem with R. I have a simple data
frame such as this one giving the number of accidents subdivided by sex,
age and region.
sex age region no_of_accidents
F young north 10
F young south 12
F old north 5
F old south 7
M young north 24
M young south 30
M old north...