Displaying 20 results from an estimated 100 matches similar to: "post hoc test after lme"
2006 Sep 14
3
converting strings to expressions
Hi,
consider this:
--------------
estr <- c("2^4", "alpha[1]")
eexp <- expression(2^4, alpha[1])
## Is it possible to get 'eexp' starting from 'estr'? The closest I could
## get was:
do.call(expression, lapply(estr, as.name))
## but it is not quite the same; e.g. the following behave differently:
library(lattice)
xyplot(1:10 ~ 1:10,
scales
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 Meadow Dr
2009 Apr 24
3
Help with for/if loop
I have 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
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
2012 Aug 10
1
Direct Method Age-Adjustment to Complex Survey Data
Hi everyone, my apologies in advance if I'm overlooking something simple in
this question. I am trying to use R's survey package to make a direct
method age-adjustment to some complex survey data. I have played with
postStratify, calibrate, rake, and simply multiplying the base weights by
the correct proportions - nothing seems to hit the published numbers on the
nose.
I am trying to
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
2009 Dec 30
1
glm error: cannot correct step size
R 2.8.1
windows XP
I am getting an error message that I don't understand when I try to 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)+
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?
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]]
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
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
2006 May 06
2
How to test for significance of random effects?
Dear list members,
I'm interested in showing that within-group statistical dependence is
negligible, so I can use ordinary linear models without including random
effects. However, I can find no mention of testing a model with vs.
without random effects in either Venable & Ripley (2002) or Pinheiro and
Bates (2000). Our in-house statisticians are not familiar with this,
either,
2003 Jun 17
1
lme() vs aov(y ~ A*B + Error(aa %in% A + bb %in% B)) [repost]
I've posted the following to R-help on May 15.
It has reproducible R code for real data -- and a real
(academic, i.e unpaid) consultion background.
I'd be glad for some insight here, mainly not for myself.
In the mean time, we've learned that it is to be expected for
anova(*, "marginal") to be contrast dependent, but still are
glad for advice if you have experience.
Thank
2009 Nov 03
1
lmer and estimable
Hi everyone,
I'm using lmer and estimable (from packages lme4 and gmodels respectively) and have the disconcerting happening that when I run exactly the same code, I get different results! In checking this out by running the code 50x, it seems to be that answers may be randomly deviating around those which I get from another stats package (GenStat, using the linear mixed models functionality
2008 Jan 28
0
(no subject)
Hi all
I am trying to generate a normal unbalanced data to estimate the coefficients of LM, LMM, GLM, and GLMM and their standard errors. Also, I am trying to estimate the variance components and their standard errors. Further, I am trying to use the likelihood ratio test to test H0: sigma^2_b = 0 (random effects variance component), and the t-test to test H0:mu=0 (intercept of the model Yij = mu
2005 Jul 18
1
Nested ANOVA with a random nested factor (how to use the lme function?)
Hi,
I am having trouble using the lme function to perform a nested ANOVA
with a random nested factor.
My design is as follows:
Location (n=6) (Random)
Site nested within each Location (n=12) (2 Sites nested within each
Location) (Random)
Dependent variable: sp (species abundance)
By using the aov function I can generate a nested ANOVA, however this
assumes that my nested
2006 Oct 08
2
latex and anova.lme problem
Dear R-helpers,
When I try
> anova(txtE2.lme, txtE2.lme1)
Model df AIC BIC logLik Test L.Ratio p-value
txtE2.lme 1 10 8590 8638 -4285
txtE2.lme1 2 7 8591 8624 -4288 1 vs 2 6.79 0.0789
> latex(anova(txtE2.lme, txtE2.lme1))
Error: object "n.group" not found
I don't even see n.group as one of the arguments of latex()
I checked to see
>
2011 Feb 03
0
Need advises on mixed-effect model ( a concrete example)
Dear R-help members,
I'm trying to run LME model on some behavioral data and need
confirmations about what I'm doing...
Here's the story...
I have some behavioral reaction time (RT) data (participants have to
detect dome kind of auditory stimuli). the dependant variable is RT
measured in milliseconds. 61 participants were tested separated in 4 age
groups (unblanced groups,
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