Displaying 20 results from an estimated 2000 matches similar to: "Fixed zeros in tables"
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
2005 Sep 16
1
How to make two figures in one plot - package vcd
Dear all,
I have a problem to make figures with two columns in package vcd.
Here an example code I take from "\library\vcd\html\plot.loglm.html"
What I need, I want to make two figures in one plot.
How could I do that.
I have tried with
layout(rbind(c(1, 1, 2, 2)))
but the same result, two plot.
Best wishes, Muhammad Subianto
library(vcd)
oldpar <- par(mfrow=c(1, 2))
## mosaic
2010 Nov 08
1
unknown dimensions for loglm
Dear R-help community,
I am working with multidimensional contingency tables and I am having
trouble getting loglm to run on all dimensions without typing out each
dimension.
I have generated random data and provided output for the results I want
below:
d1.c1 <- rnorm(20, .10, .02)
d1.c2 <- rnorm(20, .10, .02)
d2.c1 <- rnorm(20, .09, .02)
d2.c2 <- rnorm(20, .09, .02)
d3.c1 <-
2010 Apr 14
1
Sig differences in Loglinear Models for Three-Way Tables
Hi all,
I've been running loglinear models for three-way tables: one of the
variables having three levels, and the other two having two levels each.
An example looks like below:
> yes.no <- c("Yes","No")
> switch <- c("On","Off")
> att <- c("BB","AA","CC")
> L <- gl(2,1,12,yes.no)
> T <-
1999 Feb 18
1
[R] possible bug in loglm (PR#122)
Bug report: there is a problem with loglm (or some underlying code)
when used with updating within a function. For example, this code
works as expected, when used outside a function:
-------------------------------------------------
library(MASS)
1999 Apr 14
2
No LOGLM coefficients
Dear R-helpers,
Im trying to fit a Log-linear model on a dataset with bird counts from
60 sites over 14 years for 12 months each (factors for the models). One
of the aims is to predict the missing values in this dataset with model
predictions.
Ive first tried to work with GLM's, that worked fine except for models
with one or more interaction-terms. The GLMs run, run .. for hours. So I
2009 Jan 14
1
loglm fitting
Dear all,
sorry to bother you all with this but I've been trying to use the loglm in
MASS package (v2.8.0) and cannot get any sensible output.
I'm wondering am I doing something very foolish or missing something
obvious.
For example, I tried the documentation help(loglm) example - here's the
code
# Case 1: frequencies specified as an array.
sapply(minn38,
2013 Sep 12
6
declaring package dependencies
I received the following email note re: the vcdExtra package
> A vcd update has shown that packages TIMP and vcdExtra are not
> declaring their dependence on colorspace/MASS: see
>
> http://cran.r-project.org/web/checks/check_results_vcdExtra.html
But, I can't see what to do to avoid this, nor understand what has
changed in R devel.
Sure enough, CRAN now reports errors in
2002 Jan 30
1
mosaicplot(formula, data)--- bugged?
I have been tinkering with mosaicplot() and friends as a way
of learning R. As part of this, I've written a pair.table()
method for mosaic matrices, and would like to extend mosaicplot
to work with loglin and logln (MASS) objects. I'm using
R 1.4.0 on Win 98.
I've been trying to figure out the formula interface, and think
there's a bug, but not sure how to find it, yet alone fix
2002 Aug 11
1
Ordinal categorical data with GLM
Hello All:
I am looking for you help.
I am trying to replicate the results of an example found in Alan Agresti's
"Categorical Data Analysis" on pages 267-269. The example is one of a 2 x 2
cross-classification table of ordinal counts: job satisfaction and income.
I am able to get Agresti's results for the independence model (G^2 = 12.03
with df = 9) assuming as he does that
2006 Jan 18
2
Loading of namespace on load of .Rdata (was strange behaviour of load)
Last week Giovanni Parrinello posted a message asking why various packages were loaded when he loaded an .Rdata file. Brian Ripley replied saying he thought it was because the saved workspace contained a reference to the namespace of ipred. (Correspondence copied below).
This begs the question: how did the reference to the namespace of ipred come to be in the .Rdata file? Brian did say it is
2002 Jul 08
1
R Libraries for ORDINAL categorical data
Hello All:
I know the function loglin() and loglm() from librarary(MASS) performs
analysis on nominal categorical data. Are there any libraries, functions or
examples available for analysis of ordinal categorical data? I have in mind
procedures that can replicate results in Alan Agresti (1984) "Analysis of
Ordinal Categorical Data."
Thanks,
ANDREW
2013 Jul 06
0
fitting the null loglinear model with MASS::loglm??
The null loglinear model is an intercept-only model for log frequency,
log(f) = \mu
For a one-way table the test of the null model is the same as the
chisq.test.
This can be fit using loglin(), but I don't think there is any way to
specify this using MASS::loglm
> t1<- margin.table(Titanic,1)
> t1
Class
1st 2nd 3rd Crew
325 285 706 885
> loglin(t1, NULL)
0
2003 Oct 30
0
loglm() uses only a reference to data, and not data itsel f - is that on purpose??
loglm() is a port of an original written for S-PLUS. The fact that it
carries only a reference to the data frame is neither intentional nor
unintentional, but an unnoticed side-effect. I can see advantages both
ways. (I'm not so sure, either, that what you say is standard behaviour for
model fitting functions really is so universal.)
It would not be too hard to come up with a version that
2010 Jun 08
1
GEE: estimate of predictor with high time dependency
Hi,
I'm analyzing my data using GEE, which looks like below:
> interact <- geeglm(L ~ O + A + O:A,
+ data = data1, id = id,
+ family = binomial, corstr = "ar1")
> summary(interact)
Call:
geeglm(formula = lateral ~ ontask + attachment + ontask:attachment,
family = binomial, data = firstgroupnowalking, id = id, corstr = "ar1")
Coefficients:
2007 Oct 05
1
creating objects of class "xtabs" "table" in R
I have an application that would generate a cross-tabulation in array
format in R. In particular, my application would give me a result
similar to that of :
array(5,c(2,2,2,2,2))
The above could be seen as a cross-tabulation of 5 variables with 2
levels each (could be 0 and 1). In this case, the data were such that
each cell has exactly 5 observations. I
Now, I want the output to look like the
2013 Oct 16
1
Extract a predictors form constparty object (CHAID output) in R
I have a large dataset (questionnaire results) of mostly categorical
variables. I have tested for dependency between the variables using
chi-square test. There are an incomprehensible number of dependencies.
I used the chaid() function in the CHAID package to detect
interactions and separate out (what I hope to be) the underlying
structure of these dependencies for each variable. What typically
2007 Jan 09
1
contingency table analysis; generalized linear model
Dear List,
I would appreciate help on the following matter:
I am aware that higher dimensional contingency tables can be analysed using either log-linear models or as a poisson regression using a generalized linear model:
log-linear:
loglm(~Age+Site, data=xtabs(~Age+Site, data=SSites.Rev, drop.unused.levels=T))
GLM:
glm.table <- as.data.frame(xtabs(~Age+Site, data=SSites.Rev,
2006 Jan 27
1
monochrome mosaic plot in vcd package
helpeRs,
I have a nice looking mosaic plot in an article to be published
soon. Sadly, the published version will be in black and white and so ruin
the advantage of the default shading scheme of tiles.
What would readers suggest as an alternative shading scheme? If I have a
black-and-white shading scheme graduated according to suitable cutoffs I
won't be able to tell positive from
2015 Jul 07
3
List S3 methods and defining packages
Hi,
from the man page ?methods, I expected to be able to build pairs
(class,package) for a given S3 method, e.g., print, using
attr(methods(print), 'info').
However all the methods, except the ones defined in base or S4
methods, get the 'from' value "registered S3method for print", instead
of the actual package name (see below for the first rows).
Is this normal