Displaying 20 results from an estimated 7000 matches similar to: "Creating a new table from a set of constraints"
2010 May 16
2
Box-Cox Transformation: Drastic differences when varying added constants
Dear experts,
I tried to learn about Box-Cox-transformation but found the following thing:
When I had to add a constant to make all values of the original variable
positive, I found that
the lambda estimates (box.cox.powers-function) differed dramatically
depending on the specific constant chosen.
In addition, the correlation between the transformed variable and the
original were not 1 (as I
2011 Jan 23
2
Creating subsets of a matrix
Hello,
Say I have 2 columns, bmi and gender, the first being all the values and the
second being male or female. How would I subset this into males only and
females only? I have searched these fora and read endlessly about select[]
and split() functions but to no avail. Also the table is not ordered.
bmi gender -> bmi gender + bmi gender
1 24.78 male
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
2008 May 02
1
Cant resolve Error Message
Hi,
Im having trouble creating the following graph. Here is my code:
library(plotrix)
library(prettyR)
female_improvement
<-read.table("C://project/graphs/gender/breakdown/gender-improvement/female-improvement.csv",
sep=",", header=TRUE)
barp(rbind(rep(length(female_improvement$gender),2),freq(female_improvement$reason)[[1]]),
ylab="22 Males participated in the
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),
2002 Aug 02
4
extracting data from a dataframe
Hi everyone,
Here's a question about extracting data from a dataframe:
Let's say I've got a dataframe with two vectors, TEST and GENDER. GENDER
contains a 1 for males and 2 for females. I want to separate the results
of TEST by GENDER so I can compare their means.
What's the most efficient way to do this with R?
-Tim
--
Tim Wilson | Visit Sibley online: | Check out:
2010 Jan 21
1
Simple effects with Design / rms ols() function
Hi everyone,
I'm having some difficulty getting "simple effects" for the ols()
function in the rms package. The example below illustrates my
difficulty -- I'll be grateful for any help.
#make up some data
exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L,
2L, 1L, 2L, 2L, 2L, 1L, 2L), .Label = c("F", "M"), class = "factor"),
2006 Nov 25
3
Multiple Conditional Tranformations
Greetings,
I'm learning R and I'm stuck on a basic concept: how to specify a
logical condition once and then perform multiple transformations under
that condition. The program below is simplified to demonstrate the goal.
Its results are exactly what I want, but I would like to check the
logical state of gender only once and create both (or any number of)
scores at once.
2013 Nov 20
4
How to stop Kaplan-Meier curve at a time point
Hello R users
I have a question with Kaplan-Meier Curve with respect to my research. We
have done a retrospective study on fillings in the tooth and their survival
in relation to the many influencing factors. We had a long follow-up time
(upto 8yrs for some variables). However, we decided to stop the analysis at
the 6year follow up time, so that we can have uniform follow-up time for
all the
2010 Dec 09
3
hi have a question about merging.
this is the problem:
load this R data frame over the internet and save it to your hard drive.
http://rss.acs.unt.edu/Rdoc/library/twang/data/raceproling.RData
please show how to save a dataset of males only (the variable male=1) to a new dataframe. Then do the same thing for females (male=0). Then show how to recombine the two datasets to belike the original one except that the female
2012 Dec 30
3
Odds Ratio and Logistic Regression
Dear All,
I am learning the ropes about logistic regression in R.
I found some interesting examples
http://bit.ly/Vq4GgX
http://bit.ly/W9fUTg
http://bit.ly/UfK73e
but I am a bit lost.
I have several questions.
1) For instance, what is the difference between
glm.out = glm(response ~ poverty + gender, family=binomial(logit),
data=mydata)
and
glm.out = glm(response ~ poverty * gender,
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,
2008 Apr 03
2
coding for categorical variables with unequal observations
Hi,
I am doing multiple regression, and have several X variables that are
categorical.
I read that I can use dummy or contrast codes for that, but are there
any special rules when there're unequal #observations in each groups (4
females vs 7 males in a "gender" variable)?
Also, can R generate these codes for me?
THanks.
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
2012 Oct 13
3
Replace column values in R conditional on values from different column
Dear List,
I am working on a stats project and have been stumped by the issue of
replacing values in a column conditional on values from a different column.
I searched the forum and google in general, and was able to put some code
together, but it's not working the way it's supposed to... I appreciate any
help you can offer! A detailed description of the issue, and the code I came
up
2023 Nov 04
2
I need to create new variables based on two numeric variables and one dichotomize conditional category variables.
I might have factored the gender.
I'm not sure it would in any way be quicker. But might be to some extent
easier to develop variations of. And is sort of what factors should be
doing...
# make dummy data
gender <- c("Male", "Female", "Male", "Female")
WC <- c(70,60,75,65)
TG <- c(0.9, 1.1, 1.2, 1.0)
myDf <- data.frame( gender, WC, TG )
#
2004 May 27
1
Getting the same values of adjusted mean and standard errors as SAS
Hello,
I am trying to get the same values for the adjusted means and standard
errors using R that are given in SAS for the
following data. The model is Measurement ~ Age + Gender + Group. I can
get the adusted means at the mean age
by using predict. I do not know how to get the appropriate standard
errors at the adjusted means for Gender
using values from predict. So I attempted to get them
2013 Jan 06
4
random effects model
Hi A.K
Regarding my question on comparing normal/ obese/overweight with blood
pressure change, I did finally as per the first suggestion of stacking the
data and creating a normal category . This only gives me a obese not obese
14, but when I did with the wide format hoping to get a
obese14,normal14,overweight 14 Vs hibp 21, i could not complete any of the
models.
This time I classified obese=1
2010 Oct 20
1
Please help: ANOVA with SS Type III for unequal sample sized data
Dear R experts,
I'm beginner.
My question about ANOVA for unequal sample sized data should be obsolete but
I can not clarify it.
I have a dataset from 23 males and 18 females.
I measured one condition('cond') with 4 levels.
So I'd like to see main effect of gender, cond and gender by cond
interaction and also postHoc test. (In fact, I have to do anova 90 times)
*
1. Question
2007 Sep 20
3
Ambiguities in vector
Hello all you helpful people out there!
I am stil R Beginner using R 2.5.1 on a Apple Power Book G4 with Mac
OS X 10.4.10 .
Perhaps you haven?t understood my question in the mail yesterday. So
I will try to describe my problem in a different way
You see the tables. I would like to test the variables between the
tables. But for some variables in some species , I have more than 1