Displaying 20 results from an estimated 7000 matches similar to: "contingency table"
2008 Feb 01
4
Concatenate a Variable
Good morning!
I do not speak English very well and so I will try to explain the best I
can. I have this:
> tabela[,1]
[1] a a b b a c b a c c c c c
Levels: a b c
>unique(tabela[,1])
[1] a b c
Levels: a b c
>var<-unique(tabela[,1])[1]
> var
[1] a
Levels: a b c
But if I concatenate like this
> cat("VAR: ", var, "\n")
I obtain
>VAR: 1
and I
2008 Feb 11
1
The function predict
Good Morning!
May you help me? I need to understand the function predict. I need to
understand the algorithm implemented, the calculations associated. Where
can I find this information?
Thank You!
2008 Jan 09
2
Two dependent variables in formula
Hello,
I' m trying to change the formula in the rpart function. The
format of a general formula is Answer ~ expression, where Answer is
the dependent variable and expression is set of terms containing the
independent variables and separated by operators. I want the response
of the formula is more than one dependent variable. It is possible?
2008 Jan 25
2
How can I join two lists?
How can I join two lists? I have q1 and q2 and I want to merge them. I
have tried to use the comand merge, but not work. Any solutions? Thanks!
> q1
$Input1
7.84615384615385
0.5
$Input2
8.92307692307692
-3.2
$Input3
4.53846153846154
-5
> q2
$Input1
7.84615384615385
2
$Input2
8.92307692307692
-0.3125
$Input3
2009 Jan 24
3
Problem with colormodel in pdf driver
I'm trying to create figures in PDF that use the 'gray' colormodel
instead of the default 'RGB' model, by requirements of a publisher.
My problem has to do with the fact that I'm not being able to get gray
colors with this option on the pdf() driver. Here is a small example for
problem replication:
> R.version
_
platform
2008 Mar 07
3
Error
Hello!
I need some help, because I don't know how this error means: Error:
variables ?Output1?, ?Output2?, ?Output3?, ?Output4?, ?Output5? were
specified with different types from the fit
Execution halted
Can you help me?
Thank You
2008 Feb 27
7
Cross Validation
Hello,
How can I do a cross validation in R?
Thank You!
2009 Feb 24
2
Simulating contingency table (Basic question, help please)
I'd like to carry out a Monte Carlo simulation test where given data is a
contingency table. I think this is something to do with using rmultinonom(),
but I'm not sure how to code this, to simulate contingency tables. Could
anyone please help with how to use R to simulate contingency tables like
this?
--
View this message in context:
2012 May 28
2
import contingency table
hello everyone,
i often work on contingency table that I create from data.frame (with
table() function)
but a friend sent me an excel sheet wich *already is* a contingency
table (just a simple 2 way table !...)
any clue on how to import it in R (keeping row names and col names) ?
any tuto I come accross only mention the table transformation, but
never the import of such data
I only found
2011 Mar 02
4
Contingency table in R
Hi,
I have a table in R with data I needed and need to create a contingency table out of it. The table I have so far looks like this:
Binger
r
DietType No Yes
Dangerous 15 12
Healthy 52 9
None 134 24
Unhealthy 72 23
These are the error messages that I keep getting whenever I try to get a contingency table. I'm not sure why it won't work
2012 May 19
1
Contingency table and mean(sd)
Hi All,
I have a question regarding contingency tables. I would like to calculate the mean and standard deviation of a continuous variable from my own dataset based on the percentages of a contingency table I obtained from a scientific article.
dataset<- data.frame(cbind(case=rep(0:1,5), x1=c(1:10), x2=c(0:9)))
contingency_table<- matrix(c(100, 75, 65, 85, 90, 87), nrow=3, ncol=3)
In
2000 Aug 23
1
3D perspective of a contingency table
How can I draw a 3D perspective of a contingency table, that is
showing 3D bars whose height is in proportion of the table cells?
---------------
Charles RAUX,
Laboratoire d'Economie des Transports
CNRS-Universit? Lumi?re Lyon 2-ENTPE
email : charles.raux at let.ish-lyon.cnrs.fr
http://www.ish-lyon.cnrs.fr/let
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
2003 Apr 24
3
Detailed contingency tables
Is there any existing function for creating contingency tables that will
display counts, row, column, and cell percentages in the same
tables....anything similar to crosstabs in S?
Marc W. Zodet, MS
Health Statistician
Center for Cost and Financing Studies
Division of Statistical Research and Methods
2101 East Jefferson Street, Suite 500
Rockville, Maryland 20852
Phone: 301-594-7072
Fax:
2008 Mar 18
1
ask for help how to get accumulate contingency table?
Hi, I post the question again.
x<-rep(c(2,3,4),20)
y<-sample(rep(c(0,1),30))
tr<-rep(c(1:5),6)
data1<-data.frame(x,y,tr)
data1<-data1[order(data1$tr),]
> data1
x y tr
2 1 1
4 0 1
3 1 1
2 1 1
4 1 1
3 1 1
2 0 1
4 0 1
3 0 1
2 0 1
4 0 1
3 1 1
3 0 2
2 0 2
>table(data1)
tr = 1
y
x 0 1
2 2 2
3 1 3
4 3 1
tr = 2
y
x 0 1
2 2 2
3 2 2
4 1 3
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
2000 Sep 20
1
SV: sample from contingency table
I have had the same problem and I wrote this function
rmulti <- function(n, size, p)
{
NrDim <- length(p)
if(NrDim<2) stop("The simulated variabel has to be at least
2-dimensional")
res <- matrix(data=NA, nrow=n, ncol=NrDim)
p <- p/sum(p)
TempSize <- size
for(i in 1:NrDim)
{
TempP <- p[i]/sum(p[i:NrDim])
TempBin <- rbinom(n=n, size=TempSize,
2005 Feb 15
1
Tests on contingency tables
Dear all,
I have a dataset with qualitative variables (factors) and I want to test the
null hypothesis of independance between two variables for each pair by using
appropriate tests on contingency tables.
I first applied chisq.test and obtained dependance in almost all cases with
extremely small p-values and warning messages.
> chisq.test(table(data$ins.f, data$ins.st))$p.val
[1]
2009 Dec 09
1
Exporting Contingency Tables with xtable
Dear R-philes:
I am having an issue with exporting contingency tables with xtable().
I set up a contingency and convert it to a matrix for passing to
xtable() as shown below.
v.cont.table <- table(v_lda$class, grps,
dnn=c("predicted", "observed"))
v.cont.mat <- as.matrix(v.cont.table)
Both produce output as follows:
observed
predicted uh uh~
uh 201
2013 Mar 04
1
package ‘contingency.tables’ is not available (for R version 2.15.2)
I am trying to create contingency tables (to evaluate prior to performing
Pearson's Chi-Squared test for independence). I would like to see column
and row totals as well as expected and observed values and cell counts.
I tried to use the package "contingency. tables" but get the following
warning:
package ‘contingency.tables’ is not available (for R versions 2.15.2)
Is there
2011 Feb 24
1
reshaping list into a contingency table
Hi all,
I have been struggling with this problem for a few days.
I have a data table like this:
gene rpkm1 diff1 rpkm2 diff2
gene1 23 50 13 120
gene2 111 220 827 1200
gene3 75 998 71 910
And I want to re-format it so that, for each gene, I have a 2x2 contingency
table, such as:
gene rpkm diff
gene1 23 50
gene1 13 120
gene2 111 220
gene2 827