Displaying 20 results from an estimated 200 matches similar to: "Woolf's test, Odds ratio, stratification"
2011 Feb 16
1
Saturated model in binomial glm
Hi all,
Could somebody be so kind to explain to me what is the saturated model
on which deviance and degrees of freedom are calculated when fitting a
binomial glm?
Everything makes sense if I fit the model using as response a vector of
proportions or a two-column matrix. But when the response is a factor
and counts are specified via the "weights" argument, I am kind of lost
as far as
2008 Jul 30
1
odds ratios in multiway tables (stratified)
Hi,
does anyone know of a function to calculate odds ratios in multiway
tables (stratified) (+ the other usual statistics involved)
i mean:
say we have a table r*c*d,
For every d (depth) we have a r*c table,
and in this table the odds ratio's are calculated for every 2*2 subtable
in it.
logically this function would look like):
ORs(multiwaytable)
or
ORs(data$var1r,data$var2c,data$var3d)
2005 Oct 18
4
Efficient ways of finding functions and Breslow-Day test for homogeneity of the odds ratio
Dear all,
I have been trying to find a function to calculate the Breslow-Day test for
homogeneity of the odds ratio in R. I know the test can be preformed in SAS
but i was wondering if anyone could help me to perform this in r.
In addition i have the fullrefman file to search for functions in the basic
R packages, does anyone have any suggestions of an efficient way of
searching for
2012 Jan 26
1
ftable.formula
I apologize in advance if this is the wrong forum for this
report/request, and for the fact that I have not read the code for
ftable.formula in any detail.
>From reading the documentation for ftable.formula, I expected that the
following two calls to ftable would produce the same results:
data(UCBAdmissions)
ftable(UCBAdmissions, row.vars = "Dept", col.vars = c("Gender",
2007 May 05
1
How to latex tables?
Suppose I have a table constructed from structable or simply just an
object of class table. How can I convert it to a latex object? I looked
in RSiteSearch, but only found info about matrices or data frames.
Steve
For example, here is a table t2
> str(t2)
table [1:2, 1:2, 1:2] 6 8 594 592 57 ...
- attr(*, "dimnames")=List of 3
..$ Hospital : chr [1:2] "A"
2007 Mar 08
1
how to assign fixed factor in lm
Hi there,
> Value=c(709,679,699,657,594,677,592,538,476,508,505,539)
> Lard=rep(c("Fresh","Rancid"),each=6)
> Gender=rep(c("Male","Male","Male","Female","Female","Female"),2)
> Food=data.frame(Value,Lard,Gender)
> Food
Value Lard Gender
1 709 Fresh Male
2 679 Fresh Male
3 699 Fresh
2010 Dec 02
1
latex tables for 3+ dimensional tables/arrays
I'm looking for an R method to produce latex versions of tables for
table/array objects of 3 or more dimensions,
which, of necessity is flattened to a 2D display, for example with
ftable(), or vcd::structable, as shown below.
I'd be happy to settle for a flexible solution for the 3D case.
> UCB <- aperm(UCBAdmissions, c(2, 1, 3))
> ftable(UCB)
Dept A B
2008 Nov 20
1
About continuity correction option in the mantelhaen.test function.
Hello,
I was using the mantelhaen.test function (2x2 J tables for
conditional independence testing). I noticed that the option for the
continuity correction (correction=T or correction=F) sometimes made a
difference while sometimes it did give the same results regardless of
correction=T or correction=F.
Does the continuity correction apply only in certain cases or in
certain strata with some
2012 Mar 29
1
how to increase speed for function?/time efficiency of below function
i am using sarima() function as below
___________________________________________________________________________________________
sarima=function(data,p,d,q,P=0,D=0,Q=0,S=-1,tol=.001){
n=length(data)
constant=1:n
xmean=matrix(1,n,1)
if (d>0 & D>0)
fitit=arima(data, order=c(p,d,q), seasonal=list(order=c(P,D,Q),
period=S),
2009 Oct 11
3
Error in family$family : $ operator is invalid for atomic vectors
Dear List,
I'm having problem with an exercise from The R book (M.J. Crawley) on page
567.
Here is the entire code upto the point where I get an error.
data(UCBAdmissions)
x <- aperm(UCBAdmissions, c(2, 1, 3))
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
ftable(x)
fourfoldplot(x, margin = 2)
dept<-gl(6,4)
sex<-gl(2,1,24)
2006 May 10
2
problems with optimize (again)
Can someone please explain what the $minimum result of the optimize
function actually is?
I'm trying to optimize the function:
fitIT<-function(ampFac,ts_wave1,ts_template){
template<-stretchWaveTime(ts_template,ampFac)
fit<-calcFit(ts_wave1,template)
return(fit)
}
with
>optimize(f=fitIT,interval=c(0.5,4),ts_wave1=test.data[,1],ts_template=test.data[,1])
$minimum
[1]
2006 Feb 14
1
addmargins
> addmargins(UCBAdmissions, FUN = list(Total=sum))
works with no problems, but consider:
> myFUN <- list(Total=sum)
> addmargins(UCBAdmissions, FUN = myFUN)
Error in "names<-.default"(`*tmp*`, value = "") :
names() applied to a non-vector
Is this a bug?
> R.version
_
platform i386-pc-mingw32
arch i386
os mingw32
system
2016 May 23
2
data frame method for as.table()
Hello,
Currently it's possible to convert an object of class table to a data frame
with as.data.frame.table(), but there's no ready-made function, AFAIK, to do
the reverse operation, i.e. conversion of a data frame to a table.
Do you think it would be a good idea to add a data.frame method to
as.table(), to allow such conversions?
The idea is that if `x' is a table and `y <-
2008 May 04
2
Ancova_non-normality of errors
Hello Helpers,
I have some problems with fitting the model for my data...
-->my Literatur says (crawley testbook)=
Non-normality of errors-->I get a banana shape Q-Q plot with opening
of banana downwards
Structure of data:
origin wt pes gender
1 wild 5.35 147.0 male
2 wild 5.90 148.0 male
3 wild 6.00 156.0 male
4 wild 7.50 157.0 male
5 wild 5.90
2009 Feb 18
2
indicator or deviation contrasts in log-linear modelling
I am fairly new to log-linear modelling, so as opposed to trying to fit
modells, I am still trying to figure out how it actually works - hence I am
looking at the interpretation of parameters. Now it seems most people skip
this part and go directly to measuring model fit, so I am finding very few
references to actual parameters, and am of course clear on the fact that
their choice is irelevant for
2011 Mar 30
4
fonts in mosaic
I need to change the font(s) used in mosaic from package vcd.
The help file and the vignette do not give very explicit examples for
doing that.
The easiest solution would be changing the font for everything
on the graph: var labels, var names, title, subtitle, and cell labels.
What is the easiest way of accomplishing this?
2008 Nov 11
1
using newdata in survfit with categorical variable
Hi R-helpers,
I was trying to put gender='Male' in newdata to create a expected survival curve for a pseudo cohort by using survfit based on Cox regression. My codes are shown below:
fit<- coxph(Surv(end, status2)~gender, data=wlwsn1)
Summary(fit)
coef exp(coef) se(coef) z p
genderMale 0.204 1.23 0.0912 2.23 0.025
2010 Dec 27
1
aperm() should retain class of input object
aperm() was designed for multidimensional arrays, but is also useful for
table objects, particularly
with the lattice, vcd and vcdExtra packages. But aperm() was designed
and implemented before other
related object classes were conceived, and I propose a small tune-up to
make it more generally useful.
The problem is that aperm() always returns an object of class 'array',
which
2010 Dec 08
1
Question on ARIMA Prediction
Dear all,
I'm new to R and time series analysis. I'd appreciate if you could shed
light on my problem.
Here is what I have been trying to do:
1. I fit the model ARIMA(1,0,0) with the training dataset xdata[1:100]
fitit = arima(xdata, order=c(1,0,0)
2. I have some current observations in the buffer. Say that
buf = xdata_new[1:20]
3. I'm trying to forecast the xdata_new[21] based on
2006 Oct 17
5
Puppet tgz installs...
Hi
I''m anxious to get puppet into production, and although I''d prefer
installing puppet as a .deb package (as most of the servers in our
shop runs Debian), I think I''ll try to get some of my not-so-
important servers into my test setup by installing puppet with
the .tgz files.
Upon the first installation I realize that puppetd and puppetmasterd
is copied to