Displaying 16 results from an estimated 16 matches for "agecat".
2012 Aug 10
1
Direct Method Age-Adjustment to Complex Survey Data
...to hit the published numbers on the
nose.
I am trying to replicate any of the following:
the stdize and stdweight parameters from a Stata complex survey
analysis command (like this)
svyset [w= WEIGHTVAR], psu(PSUVAR) strata(STRATAVAR) vce(linearized)
svy: mean VARNAME, stdize(agecat) stdweight(agewt)
the stdvar and stdwgt parameters from a SUDAAN proc descript call
the ESTIMATE statement in a PROC SURVEYREG (used to generate adjusted
means) in SAS version 9.2
I am attempting to match figure 1 from nchs data brief #92 exactly using
R. The data are here: http://www....
2011 Feb 18
1
Using Weights in R
I am new to R. I have a data set like this (given below is a fictional
dataset):
AgeCat FINWT
1 98
2 62
1 75
3 39
4 28
2 47
2 66
4 83
1 19
3 50
I need to calculate the weighted distribution of the variable AgeCat.
In SAS i can do:
proc freq data=ageval;
tables agecat;
weight finwt;
run;
What or is there an equivalent in R?
TIA,
Krishnan
--
Krishnan Viswanathan
1101 High Mead...
2009 Apr 24
3
Help with for/if loop
...ave a set of data that includes various data columns. One if the survival
time and another if a continuous variable of ages. I want to put the ages
into intervals so that I can then perform the Kalpan Meier test. I am trying
to use the following code to build a column with the age group numbers in
agecatagory<-c( )
for (i in 1:137)
{
{
if(age[i]<=46) {agecat[i]<-1}
if(age[i]>46 & age[i]<= 58) {agecat[i]<-2}
if(age[i]>58) {agecat[i]<-3}
}
agecatagory<-c(agecatagory, agecat[i])
}
I have been getting various errors for various things and have finally got
it so that on...
2011 Jan 03
3
Inverse Gaussian Distribution
Dear,
I want to fit an inverse gaussion distribution to a data set.
The predictor variables are gender, area and agecategory.
For each of these variables I've defined a baseline
e.g.
#agecat: baseline is 3
data<-transform(data, agecat=C(factor(agecat,ordered=TRUE),
contr.treatment(n=6,base=3)))
The variable 'area' goes from A to F (6 areas: A,B,C,D,E,F)
How can i manipulate the data to set the b...
2009 Aug 14
1
post hoc test after lme
Hi!
I am quiet new with R and I have some problems to perform a posthoc test
with an lme model.
My model is the following:
>lme1<-lme(eexp~meal+time, random=~1|id,na.action=na.omit)
and then i try to get a post hoc test:
>summary(glht(lme1,linfct=mcp(meal="Tukey)))
but I get a warning message: Erreur dans as.vector(x, mode) : argument
'mode' incorrect
Thank you for your
2009 Dec 30
1
glm error: cannot correct step size
...run GLM. The error only occurs when I have all independent variables in the model. When I drop one independent variable, the model runs fine. Can anyone help me understand what the error means and how I can correct it?
Thank you,
John
> fit11<-glm(AAMTCARE~BMI+BMIsq+SEX+jPHI+jMEDICAID+factor(AgeCat)+
+ factor(jINDINC)+jMARSTAT+jEDUCATION+factor(jsmokercat)+factor(jrace),data=SimData,family=Gamma(link="log"))
Warning: step size truncated due to divergence
Error in glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, :
inner loop 1; cannot correct step size...
2008 Jan 05
2
Behavior of ordered factors in glm
I have a variable which is roughly age categories in decades. In the
original data, it came in coded:
> str(xxx)
'data.frame': 58271 obs. of 29 variables:
$ issuecat : Factor w/ 5 levels "0 - 39","40 - 49",..: 1 1 1 1...
snip
I then defined issuecat as ordered:
> xxx$issuecat<-as.ordered(xxx$issuecat)
When I include issuecat in a glm model, the result
2008 Jun 13
0
Help with stat.table in Epi package,
R Fans--
I am having problems with the following code. It worked under R 2.6.0 but not in 2.7.0.
> library(Epi)
> df <- read.table( "c:/Documents and Settings/Troy S/My Documents/debug_chisq_080613b.txt")
> summary(df)
cvd agecat
Min. :0.0000 (0,40] :1
1st Qu.:0.0000 (40,60]:2
Median :0.0000
Mean :0.3333
3rd Qu.:0.5000
Max. :1.0000
> fa <- as.factor(df$cvd)
> fb <- as.factor(df$agecat)
> stat.table(index=list("a"=fa, "...
2003 Jun 26
1
xyplot
I am doing group wise plots by using the following commands; it shows
errors that I do not know how to fix it. Please help.
xyplot(within.2.special.care ~ agecat| mco.cms.ind, neuro, panel =
function(x,y){
+ panel.grid()
+ panel.xyplot(x,y)
+ panel.loess(x,y, span =1)})
Error: couldn't find function "xyplot"
[[alternative HTML version deleted]]
2011 Aug 10
1
igraph - designing graph plot by attributes
Hi,
I'm working on some social networks and I managed to create the graphs with labels and edges weight, but I would also like to change the size of the vertices according to the age of the persons in the network and the shape according to the gender. Now for the age, I have people with ages between 20 and 78, and I would like to have 4 categories (sizes): 20-35, 36-50, 50-65, >65. I have
2010 Mar 13
3
(no subject)
Dear Colleagues,
We are attempting to create trees using R with our Ruby on Rails
application. However, we are running into a problem involving the
creation of the graphic. We would like them to be in either jpg or png
format so that users can save, but due to a lack of control over our
sever we are unable to start X11 server. Is there a way to create
these images without using X11 server?
2013 Feb 15
0
Ho w Do I Get Cox Model Convergence After Multiple Imputation
...t(myimp$imputations[[i]]$t0rcd4pc,breaks=c(-1,25,1000000000)))
colnames(myimp$imputations[[i]])[16]<-c("cd4pccat")
myimp$imputations[[i]] <-
cbind(myimp$imputations[[i]],cut(myimp$imputations[[i]]$ageatran,breaks=c(-1,36,1000000000)))
colnames(myimp$imputations[[i]])[17]<-c("agecat")
myimp$imputations[[i]] <-
cbind(myimp$imputations[[i]],cut(myimp$imputations[[i]]$t0rwfa,breaks=c(-1000,-3,-2,10)))
colnames(myimp$imputations[[i]])[18]<-c("wfacat")
myimp$imputations[[i]]
<-cbind(myimp$imputations[[i]],cut(myimp$imputations[[i]]$t0rwfh,breaks=c(-1000,-3,-...
2005 Dec 26
1
grouping-R-help
Hello R-experts,
I have a set of data as follows:
age time
1 28 1
2 53 2
3 53 3
4 36 4
5 54 4
6 46 4
7 45 5
8 31 6
9 53 7
10 35 7
11 62 8
12 19 8
13 43 2
14 51 3
15 45 0
16 48 2
17 49 3
18 57 2
19 45 3
20 27 10
21 33 12
22 29 14
23 46 16
24 45 19
25 43 2
26 28 6
27 50 7
28 28 4
2013 Jun 14
1
How to interactively create manually guided Decision Tree
I am new in using R. I want to know all about building decision tree model
in R.
Few options which I searched are rpart and rattle to build a decision
tree.Both the functions are giving me splits which are statistically
appropriate.
But I am not able to figure out how to change those splits as per my
business requirement.
for example : the automatic split of Age by using rattle is > 30 and
2006 Sep 28
3
complex plots using layout()
Dear r-help,
I am trying to plot several scatter plots with marginal histograms on
one page. Ideally, a page is equally divided into 4 figure regions.
Within each figure region, a scatter plot with marginal histograms will
be plotted.
I followed Dr. Paul Murrell's code released online to successfully plot
the scatter plot with marginal histograms. The code applies "layout()"
to
2003 Jun 27
1
R-help Digest, Vol 4, Issue 27 ( -Reply)
...R] xyplot
To: R-help at stat.math.ethz.ch
Message-ID: <000001c33c04$04b2d370$db8c5c90 at Outcome.wisc.edu>
Content-Type: text/plain
I am doing group wise plots by using the following commands; it shows
errors that I do not know how to fix it. Please help.
xyplot(within.2.special.care ~ agecat| mco.cms.ind, neuro, panel =
function(x,y){
+ panel.grid()
+ panel.xyplot(x,y)
+ panel.loess(x,y, span =1)})
Error: couldn't find function "xyplot"
[[alternative HTML version deleted]]
------------------------------
Message: 35
Date: Thu, 26 Jun 2003 19:03:36 +02120 (MEST)
From...