Displaying 20 results from an estimated 7000 matches similar to: "testing independence of categorical variables"
2007 Nov 16
7
sorting factor levels by data frequency of levels
using an example from r online help
> state <- c("tas", "sa", "qld", "nsw", "nsw", "nt", "wa", "wa",
"qld", "vic", "nsw", "vic", "qld", "qld", "sa", "tas",
"sa", "nt", "wa", "vic",
2009 Feb 12
2
R Connection with Teradata (Windows)
Hi all,
I am trying to connect Teradata with R using Windows. Due I need to install any specific package or what? I am bit clue-less. Can someone help.
Regards,
Saj
_________________________________________________________________
[[alternative HTML version deleted]]
2007 Nov 13
2
plotting coxph results using survfit() function
i want to make survival plots for a coxph object using survfit
function. mod.phm is an object of coxph class which calculated results
using columns X and Y from the DataFrame. Both X and Y are
categorical. I want survival plots which shows a single line for each
of the categories of X i.e. '4' and 'C'. I am getting the following
error:
> attach(DataFrame)
>
2005 Jun 23
1
the dimname of a table
i have a data frame(dat) which has many variables.and i use the following script to get the crosstable.
>danx2<-c("x1.1","x1.2","x1.3","x1.4","x1.5","x2","x4","x5","x6","x7","x8.1","x8.2","x8.3","x8.4","x11",
2002 Jul 27
1
R Code for X-Tab with Row/Col Proportions, Expected Vals and Tests
Recently, I noted a post and replies on R-Help from Professor Marc
Feldesman regarding a cross tabulation function that generates row and
column proportions, marginal values, expected cell values and tests for
independence presumably similar in a fashion to the output of the S-Plus
crosstabs() function or the SAS Proc Freq.
Martin Maechler had posted some code in reply for folks to update and
2002 May 23
2
Find if there is independence
Hello
I have the matrix
a<-matrix(c(2,1,0,1,2,2,1,5,7,2,5,12),nrow=6)
a
[,1] [,2]
[1,] 2 1
[2,] 1 5
[3,] 0 7
[4,] 1 2
[5,] 2 5
[6,] 2 12
Suppose that in the first row we have 3 men of England, 2 with hair, and 1
no
In the second we have 6 italian men, 1 with hair and 5 no ...
I want to find if there is a dependence between men withouth hair and
2002 Jul 12
2
Crosstabs in R
Before I reinvent the wheel, I have need for a relatively straightforward
crosstabulation (2 x n) function. I know that R has table(), ftable(),
xtabs(), and summary(xtabs()), but none of these produce a fully "tricked"
out cross-tabulation with marginal totals, expected cell frequencies, and
an array of statistics about the contingency table.
Is there a more complete (something
2008 May 06
4
categorical data analysis
hie all
i am trying to carry out a categorical data analysis but my problem is that when in i use the chi squared test some of my expected values are less than 5. is there a test that can handle this situation. the data is not a 2*2 table. its more from the social sciences where you have from strongly agree to strongly disagree. i know i can collapse vthe tables but there is a loss of
2013 Dec 10
1
fisher.test - can I use non-integer expected values?
I seem to be able to use expected values that are decimal (e.g., 1.33) when
using chisq.test but not when using fisher.test. This happens when using an
array/matrix as input. Fisher.test returns: Error in sprintf(gettext(fmt,
domain = domain), ...) : invalid format '%d'; use format %s for character
objects.
Thus, it appears fisher.test is looking for integers only.
I tried putting the
2012 Dec 01
4
Getting all possible contingency tables
Hello all,
Let say I have 2-way contingency table:
Tab <- matrix(c(8, 10, 12, 6), nr = 2)
and the Chi-squared test could not reject the independence:
> chisq.test(Tab)
Pearson's Chi-squared test with Yates' continuity correction
data: Tab
X-squared = 1.0125, df = 1, p-value = 0.3143
However I want to get all possible contingency tables under this
independence
2005 Jun 26
2
chisq.test using amalgamation automatically (possible ?!?)
Dear List,
If any of observed and/or expected data has less than
5 frequencies, then chisq.test (Pearson's Chi-squared
Test for Count Data from package:stats) gives warning
messages. For example,
x<-c(10, 14, 10, 11, 11, 7, 8, 4, 1, 4, 4, 2, 1, 1, 2,
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
y<-c(9.13112391745095, 13.1626482033341,
12.6623267638188, 11.0130706413029, 9.16415925139016,
2011 Dec 30
2
Joint modelling of survival data
Assume that we collect below data : -
subjects = 20 males + 20 females, every single individual is independence,
and difference
events = 1, 2, 3... n
covariates = 4 blood types A, B, AB, O
http://r.789695.n4.nabble.com/file/n4245397/CodeCogsEqn.jpeg
?m = hazards rates for male
?n = hazards rates for female
Wm = Wn x ?, frailty for males, where ? is the edge ratio of male compare to
female
Wn =
2016 Apr 28
15
[Bug 95188] New: GeForce 840M (GM108) troubles
https://bugs.freedesktop.org/show_bug.cgi?id=95188
Bug ID: 95188
Summary: GeForce 840M (GM108) troubles
Product: xorg
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
Assignee: nouveau at lists.freedesktop.org
2010 Nov 25
1
Generalized linear models with categorical data
An embedded and charset-unspecified text was scrubbed...
Name: n?o dispon?vel
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20101125/6e4fdccc/attachment.pl>
2009 Feb 09
2
R equivalent of SAS Cochran-Mantel-Haenszel tests?
In SAS, for a two-way (or 3-way, stratified) table, the CMH option in
SAS PROC FREQ gives
3 tests that take ordinality of the factors into account, for both
variables, just the column variable
or neither. Is there an equivalent in R?
The mantelhaen.test in stats gives something quite different (a test of
conditional independence for
*nominal* factors in a 3-way table).
e.g. I'd like to
2011 Nov 10
2
Listing tables together from random samples from a generated population?
.
HI there,
I'd like to show demonstrate how the chi-squared distribution works, so I've come up with a sample data frame of two categorical variables
y<-data.frame(gender=sample(c('Male', 'Female'), size=100000, replace=TRUE, c(0.5, 0.5)), tea=sample(c('Yes', 'No'), size=100000, replace=TRUE, c(0.5, 0.5)))
And I'd like to create a list of 100
2012 Jul 27
2
producing a graph with glm poisson distributed respons count data and categorical independant variables
Hello,
I am working on my thesis and can't really figure out how to produce a
reasonable graph from the output from my glm.,
I could just give the R-output in my results and then discuss them, but it
would be more interesting if I could visualise what is going on.
My research is how bees react to different fieldmargins, for this I have 4
different types of field margin (A,B,C & D) and
2012 Aug 10
2
creating a contingency table from a data.frame automatically (NOT BY HAND)
Hello there!
I am still struggling with a binomial response over all categorical
variables (some of them with 3 levels, most with 2 levels). After
initial struggles with glm's (struggle coming from the data, not the
actual analysis) I have decided to prefer contingency tables. I have my
data such as:
response:
2009 Jun 03
1
Validity of Pearson's Chi-Square for Large Tables
Is Pearson's Chi-Square test for contingency tables asymptotically unbiased
for large tables (large degrees of freedom) regardless of the expected
values in each cell? The rule of thumb is that Pearson's Chi-square should
not be used when large numbers of cells have expected values < 5. However,
I compared the results on 4x4 contingency tables for R's chisq.test using
chi-square
2005 Sep 15
4
Rcommander and simple chisquare
In this years biostat teaching I will include Rcommander (it indeed
simplifies syntax problems that makes students frequently miss the
core statistical problems). But I could not find how to make a simple
chisquare comparison between observed frequencies and expected
frequencies (eg in genetics where you expect phenotypic frequencies
corresponding to 3:1 in standard dominant/recessif