Displaying 16 results from an estimated 16 matches for "agegp".
2008 Aug 01
2
is this a bug (apply and class) ?
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?...
Nom : non disponible
URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20080801/a1a7c3e9/attachment.pl>
2007 Jun 12
1
Post-hoc tests for interactions of between- and within-subject factors
...-subject factors?
For instance, I have a data set of performance of adults of different age
groups (20-30, 60-70,70-80) performing a WM task (n-back, with n=1,2,3,4) in
two different conditions (while sitting or walking). The corresponding ANOVA
produces the following output
> gm = aov(cog ~ agegp*nback*cond+Error(id/(cond*nback)),data = g);
> summary(gm)
Error: id
Df Sum Sq Mean Sq
agegp 1 7.0268 7.0268
Error: id:cond
Df Sum Sq Mean Sq
cond 1 5.1788 5.1788
Error: id:nback
Df Sum Sq Mean Sq
nback 2 586.88 293.44
Error: id:cond:nback
Df Sum Sq Mean Sq...
2003 Sep 16
2
How does "subset" replace arguments? (PR#4193)
Full_Name: Axel Benz
Version: 1.7.1
OS: Windows
Submission from: (NULL) (137.251.33.43)
Hello,
I guess many people will answer me again that this is a S language feature, but
I am only a stupid computer scientist and I simply do not understand this logic,
despite of reading a lot about S:
> test
field tuckey
4 Kreis2 -1
5 Kreis5 -2
9 Metall -3
17
2003 Jan 21
1
[R] proposal: lattice/levelplot: panel.catlevelplot
....regions[i.col]
)
}
}
}
}
#------ EXAMPLE -----------------------------------------------------------
data(esoph)
library(lattice)
example1.catlevelplot.esoph <- function( ... ){
ncolors <- nlevels( esoph$alcgp )
print( levelplot( ncases ~ agegp * alcgp | tobgp, data=esoph
, main = 'esoph data set'
, sub = 'tobgp'
, cuts = ncolors
, layout = c( 4, 4 )
, scales=list(
x = list( labels = levels( esoph$agegp ), rot=90, alternating=F )
, y = lis...
2008 Dec 01
1
How to make a banner table.
I have a dataframe with the following variables:
idnum area gender race etc.
I would like to make a table that looks like
area gender race
M F B W A
1 4 5 3 5 1
2 6 7 4 6 3
etc.
Basically, I want to make a single broad table with a number of sub-set
tables. I have tried:
cbind(table(area, gender), table(area, race))
But, when I do this, I lose the labels gender / race. This makes it
2006 Aug 25
2
xyplot with different symbols and colors?
Dear List,
I try to make a xyplot with different colors and symbols, I came this far:
library(DAAG)
xyplot(csoa~it|sex*agegp,data=tinting,groups=target,pch=list(1,2),auto.key=list(space
= "right"))
this produces a plot with different colors and symbols but unfortunately
the legend does only follow the color scheme and not the different symbols.
Any suggestions what to change?
And how do I change or switch o...
2002 Aug 13
1
interaction.plot() legend too narrow when mfcol > 2 (PR#1899)
...uot;device"))()
par(mfrow = c(2,2))
## part of example(interaction.plot) _improved_ using with() :
data(OrchardSprays)
with(OrchardSprays, {
interaction.plot(treatment, rowpos, decrease)
interaction.plot(rowpos, treatment, decrease)
})
data(esoph)
with(esoph, {
interaction.plot(agegp, alcgp, ncases/ncontrols)
interaction.plot(agegp, tobgp, ncases/ncontrols, trace.label="tobacco",
fixed=TRUE)
})
-------------------------------
Something that should be easy to fix, but needs some care (and
time).
Volunteers?
Martin Maechler <maechler@stat...
2023 Mar 30
1
Problems with foreign
Good day
My name is Jos? Oscar, I'm from Mexico and I have some questions about
foreign in your write.foreig( ) function. We know that this function
generates the inputs to be able to run them or execute them in another
program like SPSS, SAS or Stata. In these cases, when creating an example
file, a matrix and using the function to execute the .sps file directly
from SPSS, I don't care or
2005 Apr 09
4
make check-all fails (PR#7784)
...ry `/home/znmeb/R-beta/tests'
make: *** [check-all] Error 2
I looked at "tests/reg-tests-1.Rout.fail"; it's 1427 lines long. The error given
is
> ## Comments:
>
>
> ## PR 796 (aic in binomial models is often wrong)
> ##
> a1 <- glm(cbind(ncases, ncontrols) ~ agegp + tobgp * alcgp,
+ data = esoph, family = binomial())$aic
> a1
[1] 236.9645
> a2 <- glm(ncases/(ncases+ncontrols) ~ agegp + tobgp * alcgp,
+ data = esoph, family = binomial(), weights=ncases+ncontrols)$aic
> a2
[1] 236.9645
> stopifnot(a1 == a2)
Error: a1 == a2 is not TRUE
Ex...
2010 Apr 19
1
BRugs
Hi. I am new here, and I am writing this Winbugs code with BRugs.
n=length(bi.bmi)
Lagegp=13
Lgen=2
Lrace=5
Lstra=15
Lpsu=2
#model gen x race
bi.bmi.model=function(){
# likelihood
for (i in 1:n){
bi.bmi[i]~ dbern(p[i])
logit(p[i])<- a0 + a1[agegp[i]]+a2[gen[i]]+a3[race[i]]
+ a12[agegp[i], gen[i]]
+ gam[stra[i]]+ u[psu[i],stra[i]] }
# constraints for a1, a2, a3, a12
a1[1...
2019 Apr 05
6
all.equal failure
This arose in testing [.terms and has me confused.
data(esoph)?? # use a standard data set
t0x <- terms(model.frame( ~ tobgp, data=esoph))
t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
t1x <- (delete.response(t1))[-1]
> all.equal(t0x, t1x)
[1] TRUE
# the above is wrong, because they actually are not the same
> all.equal(attr(t0x, 'dataClasses'), attr(t1x, 'dataClasses'))
[1] "Names: 1 string mismatch"
[2] "Lengths...
2019 Apr 05
0
all.equal failure
On 05/04/2019 9:03 a.m., Therneau, Terry M., Ph.D. via R-devel wrote:
> This arose in testing [.terms and has me confused.
>
> data(esoph)?? # use a standard data set
>
> t0x <- terms(model.frame( ~ tobgp, data=esoph))
> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
> t1x <- (delete.response(t1))[-1]
>
> > all.equal(t0x, t1x)
> [1] TRUE
>
> # the above is wrong, because they actually are not the same
>
> > all.equal(attr(t0x, 'dataClasses'), attr(t1x, 'dataClasses'))
> [1] "N...
2005 Nov 18
1
challenge: using 'subset = <computed>' inside function ..
...#or subset = eval(substitute(Y > 0, list(Y = formula[[2]]))),
##or subset = as.expression(bquote(.(formula[[2]]) > 0)),
##or subset = bquote(.(formula[[2]]) > 0),
na.action = na.action)
mf
}
## never works
tst(ncases ~ agegp + alcgp, data = esoph)
traceback() #--> shows that inside model.frame.default
# eval(substitute(subset, ...)) is called as well
----
Happy quizzing..
Martin Maechler, ETH Zurich
2019 Apr 05
0
[EXTERNAL] Re: all.equal failure
...erneau, Terry M., Ph.D. via R-devel wrote:
>>> This arose in testing [.terms and has me confused.
>>>
>>> data(esoph)?? # use a standard data set
>>>
>>> t0x <- terms(model.frame( ~ tobgp, data=esoph))
>>> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
>>> t1x <- (delete.response(t1))[-1]
>>>
>>> ? > all.equal(t0x, t1x)
>>> [1] TRUE
>>>
>>> # the above is wrong, because they actually are not the same
>>>
>>> ? > all.equal(attr(t0x, 'dataClas...
2019 Apr 05
0
[EXTERNAL] Re: Re: all.equal failure
...gt;>>> This arose in testing [.terms and has me confused.
>>>>>
>>>>> data(esoph)?? # use a standard data set
>>>>>
>>>>> t0x <- terms(model.frame( ~ tobgp, data=esoph))
>>>>> t1 <-? terms(model.frame(ncases ~ agegp + tobgp, data=esoph))
>>>>> t1x <- (delete.response(t1))[-1]
>>>>>
>>>>> ? > all.equal(t0x, t1x)
>>>>> [1] TRUE
>>>>>
>>>>> # the above is wrong, because they actually are not the same
>>>>&...
2003 Apr 24
2
R-1.7.0 build feedback: NetBSD 1.6 (PR#2837)
R-1.7.0 built on NetBSD 1.6, but the validation test suite failed:
Machinetype: Intel Pentium III (600 MHz); NetBSD 1.6 (GENERIC)
Remote gcc version: gcc (GCC) 3.2.2
Remote g++ version: g++ (GCC) 3.2.2
Configure environment: CC=gcc CXX=g++ LDFLAGS=-Wl,-rpath,/usr/local/lib
make[5]: Entering directory `/local/build/R-1.7.0/src/library'
>>> Building/Updating