similar to: Hypothsis simulation

Displaying 20 results from an estimated 10000 matches similar to: "Hypothsis simulation"

2010 Jan 19
1
(no subject)
I am considering testing: Ho: Odds Ratio =1 H1: Odds Ratio <>1 How can I generate data from the null distribution for a specific configuration of a Fisher exact test? Jim [[alternative HTML version deleted]]
2010 Sep 10
1
Simulation
I have two questions: (1) How do you 'create' an 2 x 2 table in R using say an Odd ratio of 3 or even 0.5 (2) If I have several 2 x 2 tables, how can I 'implement' dependence in the tables with say 25 of the Tables having an odds ratio of 1 and 75 of the tables having an odds ratio of 4? Jim [[alternative HTML version deleted]]
2005 Feb 28
2
A problem about outer()
Dear all, I have something about function outer() that I can't understand. Just see the following example. The two NaNs are due to 0/0, but I can't figure out the cause of the last two errors. I wonder if some one can explain this for me. ___________________________________________________________________ > sx=rbinom(10,1,0.5);ot=rbinom(10,1,0.5);ag <- rbinom(10,100,0.3);ho <-
2009 Aug 26
2
Statistical question about logistic regression simulation
Hi R help list I'm simulating logistic regression data with a specified odds ratio (beta) and have a problem/unexpected behaviour that occurs. The datasets includes a lognormal exposure and diseased and healthy subjects. Here is my loop: ors <- vector() for(i in 1:200){ # First, I create a vector with a lognormally distributed exposure: n <- 10000 # number of study subjects
2009 Mar 21
5
Fisher test problem
Hi, I noted a discrepancy between R and openepi when I ran a fisher test with the same matrix. In R: > a=matrix(c(1,2,6,17), nrow=2) > a [,1] [,2] [1,] 1 6 [2,] 2 17 > fisher.test(a, conf.int=T) Fisher's Exact Test for Count Data data: a p-value = 1 alternative hypothesis: true odds ratio is not equal to 1 95 percent confidence interval: 0.02061498
2006 Jul 10
1
Query:chi-squre test
Hi, I have calculated chi-square goodness of fit test,Sample coming from Poisson distribution. please copy this script in R & run the script The R script is as follows ########################## start ######################################### No_of_Frauds<- c(4,1,6,9,9,10,2,4,8,2,3,0,1,2,3,1,3,4,5,4,4,4,9,5,4,3,11,8,12,3,10,0,7) lambda<- mean(No_of_Frauds) # Chi-Squared
2006 Jun 30
2
Query : Chi Square goodness of fit test
I want to calculate chi square test of goodness of fit to test, Sample coming from Poisson distribution. please copy this script in R & run the script The R script is as follows ########################## start ######################################### No_of_Frouds<- c(4,1,6,9,9,10,2,4,8,2,3,0,1,2,3,1,3,4,5,4,4,4,9,5,4,3,11,8,12,3,10,0,7) N <- length(No_of_Frouds) # Estimation of
2011 Aug 27
1
Overdispersed GLM
Hi all, I have the following data: rep1_treat rep2_treat rep1_control rep2_control 2 3 4 5 100 20 98 54 0 1 2 3 23 32 27
2003 Oct 09
3
simulate binary data from a logistic regression model
Hi. How can i simulate a binary data set from a logistic regression model?I need to manipulate parameters and so obtain my set of data. I want to show the improve in analyzing binary data with GLM(binomial) model instead of classical ANOVA or NON-MODELS procedures(relative risk-odds ratio-Pearson test of godness of fit...) Can you say me what is the right function to use? Do you know any
2010 Sep 23
2
Error: attempt to apply non-function
This code worked fine for me, then did some cleaning up of formatting using ESS (Emacs) and now I get this error, no idea what is causing it, all the brackets/parentheses seem to be balanced. What have I done wrong? Thanks Jim p0.trial01 <- 0.25 TruOR01 <- 0.80 num.patients.01 <- 50 num.trials.01 <- 5 LOR01.het.in <- 0.00 num.sims <- 1 simLOR01 <-
2006 Sep 20
1
Simulation help
I'm trying to simulate trend data over a five year period. I want different trend profiles...the simplest being a linear trend. I've been using the following code: patBdta1 <- NULL for(i in 1:100) patBdta1 <- rbind(patBdta1,c(yr1= mean(rbinom(50,1,.50)), yr2 =mean(rbinom(50,1,.51)), yr3 =mean(rbinom(50,1,.52)),
2006 Jun 16
0
The qurey about kolmogorov-smirnov test & adding the trendline to graph
I am hereby forwarding the data & method use to calculate the Kolmogorov-Smirnov goodness of fit test made manually by me in R launguage which deffers with the actual inbuilt formula as shown below. Further I have plot the graph in R. In that graph how to add trendline (i.e. straight line passing through maximum points in plot) to a Plot. R script is as follows please run this script to see
2007 Nov 12
4
a repetition of simulation
Hello, I have a simple (?) simulation problem. I'm doing a simulation with logistic model and I want to reapet it 600 times. The simulation looks like this: z <- 0 x <- 0 y <- 0 aps <- 0 tiss <- 0 for (i in 1:500){ z[i] <- rbinom(1, 1, .6) x[i] <- rbinom(1, 1, .95) y[i] <- z[i]*x[i] if (y[i]==1) aps[i] <- rnorm(1,mean=13.4, sd=7.09) else aps[i] <-
2010 Apr 13
1
Simulation problem.
Hi, I have problem with simulating. This is my task... Suppose that there are N persons some of whom are sick with influenza. The following assumptions are made: * when a sick person meets a healthy one, the chance is á that the latter will be infected * all encounters are between two persons Write a function which simulates this model for various values of N (say, 10 000) and á (say, between
2009 Apr 17
5
Binomial simulation
Hi Guy's I was wondering if someone could point me in the right direction. dbinom(10,1,0.25) I am using dbinom(10,1,0.25) to calculate the probabilty of 10 judges choosing a certain brand x times. I was wondering how I would go about simulating 1000 trials of each x value ? regards Brendan -- View this message in context:
2011 Oct 14
1
Wilcoxon and the use of simulation
Dear forum users, It's 3:35am and I am swamped with statistics homework lol I'm terrible with R and this time I have no idea what the prof wants. Here is the question: Consider the (two-??sample) Wilcoxon rank statistic T = ?rank(Xi). For n1=106 and n2=192, determine by simulation the ?=.05 critical point for testing H0: ?=0, H1:?<0. We can do this as follows: For m=10000 (no wimpy
2006 Jul 16
17
AWDWR question
In an early section on Action View, showing code being put directly into the rhtml file: <% require ''date'' DAY_NAMES = %w{ Sunday Monday Tuesday Wednesday Thursday Friday Saturday } today = Date.today %> <h1>Hello, Dave</h1> <p> It''s <%= DAY_NAMES[today.wday] %>. Tomorrow is <%= DAY_NAMES[(today + 1).wday %>. </p> I get this
2011 Apr 08
4
Fast version of Fisher's Exact Test
Is anyone aware of a fast way of doing fisher's exact test for a series of 2 x 2 tables in R? The fisher.test is really slow if n1=1000 and n2 = 1000. -- Thanks, Jim. [[alternative HTML version deleted]]
2007 Nov 08
1
how to generate data in a simulation study
hello, I have a problem in how to generate data in a simulation study. I have a logistic model to evaluate p by 3 covariates. I need to generate 4 variables: the binary outcome Y and 3 covariates: gender (binary) and aps and tiss (continuous variables). I have the logistic model which is the expected model: log(p(y=1)/(1-p(y=1))=-1.659-0.05*sex+0.063*aps+0.04*tiss0) I generate the outcome y like
2015 Jan 22
5
Simulación de modelo logit con interacción
Hola, Deseo simular un modelo logit con interacción, estimar sus coeficientes y comprobar si son o no parecidos al modelo teórico. Con este ejemplo obtengo que los coeficientes estimados no se asemejan mucho a los originales. ¿Se le ocurre a alguien cuál es el motivo de esta discrepancia? ¿y cómo solucionarlo? Muchas gracias Emilio logisticsimulation <- function(n){ dat <-