[R] Cronbach's Alpha

2017-01-17 Thread Jim Silverton
Dear all, I have 12 companies and I am developing a scale for innovation. I want to check the reliability of my scale. I delivered it to different (engineers, managers etc) people in each company and an unequal number of values. For example: Company 12 engineers 2 managers Company 24

Re: [R] Simulating data from a nested design

2015-06-06 Thread Jim Silverton
Hi, I am trying to 'create' a nested design with A, B nested in A and C nested in B. C is random and the others are fixed. Does anyone have any idea how to do this? I would also like to try the other nested designs with all random and all effects fixed. -- Thanks, Jim. [[alternative

[R] Help with Boxplot

2015-03-05 Thread Jim Silverton
I have the following R code for a boxplot. But I keep getting 4 1's, 4 2's and 4 3's on the x asis for which I reall want to relace the 1's by agegroup 1 the 2's by age group 2 etc. And I don't want to replce it 4 times just once. Can anyone help. boxplot(data.all ~ age.group, data = data.plots,

Re: [R] PCA with a lot of zeros

2014-07-08 Thread Jim Silverton
Hello all, I was wondering if R has some routine that can handle PCA with a lot of zeros. I have fourteen variables - these variables represent angles...so there are some negative and some positive angles. Histograms appear sparse - in the sense that there are gaps. Any ideas or papers would be

[R] Block Recursion and Structural Vector Autoregressions

2014-06-12 Thread Jim Silverton
Hi, I am trying to get the code for paper entitled Block recursion and structural vector autoregressions by Tao Zha. Anyone has any R packages. I googled but I did not come up with anything of interest. Any help is greatly appreciated. -- Thanks, Jim. [[alternative HTML version deleted]]

[R] (no subject)

2013-11-19 Thread Jim Silverton
I generated some random data using R and then trying to see if it came from the same distribution but the erros keep piling. Can anyone help? y=rchisq(10,1) mean(y) var(y) library(MASS) fitdistr(y, chi-squared, start = list(4), method = Brent, lower=0.9, upper=3) -- Thanks, Jim.

[R] Analysis

2013-11-13 Thread Jim Silverton
Hi, I have 187 urine cultures which were subjected to culture and microscopy methods. Video were used to 'verify' the findings. Culture is considered the gold method. But Microscopy is another method which may be cheaper. I checked the videos to determine whether bacteria was growing on both

Re: [R] R Packages in Mac

2013-11-02 Thread Jim Silverton
Hello everyone, I am interested in finding out why some packages don't work on Mac like the package 'vcd' Is there a fix? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Mixture of beta distributions

2013-05-30 Thread Jim Silverton
Hi, I am looking for an R package that can handle a mixture of two beta continuous distributions or a mixture of two beta discrete discrete distributions. Is it possible to force the distributions to be either strictly increasing or strictly decreasing? If there are papers out there can you sen

Re: [R] Counting confidence intervals

2013-03-18 Thread Jim Silverton
Hi, I have a 2 x 1 matrix of confidence intervals. The first column is the lower and the next column is the upper. I want to cont how many times a number say 12 lies in the interval. Can anyone assist? -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Counting confidence intervals

2013-03-18 Thread Jim Silverton
--- Sent from my phone. Please excuse my brevity. Jim Silverton jim.silver...@gmail.com wrote: Hi, I have a 2 x 1 matrix of confidence intervals. The first column is the lower and the next column is the upper. I want to cont

Re: [R] Histogram

2012-07-30 Thread Jim Silverton
- hist(mydata, breaks=quantile(mydata, probs=seq(0, 1, length.out = length(mydata)/50 + 1))) mydata.hist$counts Sarah On Thu, Jul 5, 2012 at 3:37 PM, Jim Silverton jim.silver...@gmail.com wrote: Thanks Sarah!! Ok so if I have say x = runif(1000,0,1) say instead if the normal

Re: [R] Histogram

2012-07-05 Thread Jim Silverton
I have a column of 1000 datapoints from the normal distribution with mean 2 and variance 4. How can I get a histogram of these observations with 20 bins with each bin having 50 observations? -- Thanks, Jim. [[alternative HTML version deleted]]

[R] Latent Class Analysis

2012-06-20 Thread Jim Silverton
Hi, In running a latent class analysis. Do I first check for significant categorical predictors and only use those in the latent class model? For example, if I have a dependent variable that is binary and I have 30 categorical independent variables, should I run a logistic regression first to find

Re: [R] Accessing a list

2012-04-24 Thread Jim Silverton
Hi, I have the following problem- I want to access a list whose elements are imp1, imp2, imp3 etc I tried theusing the paste comand in a for loop see the last for loop below. But I keep calling it df but df = imp1 (for the first run). Any ideas on how I can access the elements of the list? Isaac

Re: [R] Update Packages error

2012-03-29 Thread Jim Silverton
Anyone knows how to get around this message? I am trying to update some packages in R but I get the following message I use R for 64 bit windows. Warning in install.packages(update[instlib == l, Package], l, contriburl = contriburl, : 'lib = C:/Program Files/R/R-2.14.1/library' is not writable

Re: [R] PCA Kernel

2012-03-12 Thread Jim Silverton
Hi, I have 6 variables and I want to do a PCA Kernel on the 6 variables. But I want the scores from the from the PCA kernel method. for each subject. Does anyone know how to do this? -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] Bootstrapping

2012-02-27 Thread Jim Silverton
Hi, I am doing some bootstrap. This the is the method I am procceding: I select a value of sigma and set the sharp ratio = 4. From this I can compute the mean mu. For a set sample size say n = 11, I generate 999 samples of size 11 with the sigma and mean above. This is a 11 x 999 matrix. Now, I

Re: [R] Superimpose xversus y plot on a histogram of x

2011-11-01 Thread Jim Silverton
I need a plot with a histogram z and a plot of z versus y superimposed. This is not working... z = rnorm(1000) y = rnorm(1000,1,2) hist(z) dx = plot(z, y, lwd = 1) lines(dx, add=TRUE) -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] Counting the number of marginals

2011-10-26 Thread Jim Silverton
Dear all, I have two matrices lets call them A and B. Each of which is a 100 x 3 matrix. What I do is take the corresponding row from each matrix and form 100 2 x 3 tables. If we call the column sums for each 2 x 3 n1, n2 and n3, I would like to compute the following probability: Basically the

Re: [R] 2 x 3 Probability under the null

2011-10-26 Thread Jim Silverton
I have a 2 x 3 matrix called snp and I want to compute the following probability: choose(sum(snp[,1]), snp[1,1]) * choose(sum(snp[,2]), snp[1,2]) * choose(sum(snp[,3]), snp[1,3])/choose(sum(snp), sum(snp[1,])) but I keep getting Infs and NaNs. Is there a function that can do this in R? --

Re: [R] 2 x 3 Tables

2011-10-24 Thread Jim Silverton
Hello all, I have the following. Two sets of p x 3 matrices where p is say relatively large. My data looks like : mat1 2 3 4 2 3 4 1 2 3 mat2 2 3 4 12 12 4 10 12 3 when p = 3. I form a 2 x 3 contingency table using the i^th row from each matrix. Its Fisher's exact

Re: [R] Sum of Probabilities in a matrix...

2011-10-01 Thread Jim Silverton
Hi all, I have 2 columns in a mtrix, one of which is a column of probabilities and the other is simply a vector of integers. I want to sum all the probabilities with the same integer value and put it in a new column. For example, If my matrix is: 0.98 2 0.2 1 0.01 2 0.5 1 0.6 6

Re: [R] Proportions of a vector

2011-09-22 Thread Jim Silverton
Hi all, I have a vector xm say: xm = c(1,2,3,4,5,5,5,6,6) I want to return a vector with the corresponding probabilities based on the amount of times the numbers occurred. For example, I should get the following vector for xm: prob.xm = c(1/9, 1/9, 1/9, 1/9, 3/9, 3/9, 3/9, 2/9, 2/9)

[R] GLM Question

2011-09-09 Thread Jim Silverton
The minimum achievable level of significance is defined asthe minimum of Prob(Y=y) over all y's. If I have GLM with a treatment and replicate and I would like to find out how to compute the minimum achievable level of significance for that GLM in R For example, how do I do this for the following

Re: [R] Negative Binomial GLM

2011-09-01 Thread Jim Silverton
Hi all, I am using the negative binomila glm in MASS. This is my data alled data1: Reps Treats counts HSM11 0 21 HSM22 0 34 HSM33 0 27 PTM11 1 32 PTM22 1 20 PTM33 1 23 I goal is to do a GLM to extract the

Re: [R] Generating contingency tables from the null

2011-08-29 Thread Jim Silverton
Hi all, I have a 3x4 contingency table with row totals all being 100. I want to generate 3 x 4 tables from the null distribution. Which R function can do this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Overdispersed GLM

2011-08-27 Thread Jim Silverton
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

Re: [R] Column of probabilities

2011-08-26 Thread Jim Silverton
H all, I have a 6 x 3 matrix. The last column is simply the sum of of the first two rows. x1 x2 x3 1 23 2 13 1 01 2 24 2 13 2 13 0 00 I want to create a column of probabilities p, such that for each row, I want to find the probability

Re: [R] Change point in CDF

2011-08-25 Thread Jim Silverton
Hi all, I have some data. I want to fit a smooth cdf to the data. Then I want to find both the value of x and the % on the y axis for which the the slope is 1 ( or the point where the slope change is the greatest...hummh well the part where you can identify where there is a point of

Re: [R] Sharp turn in cdf?

2011-08-25 Thread Jim Silverton
x = c(runif(1000, 0,2.5), runif(100, 2.5, 4)) plot(ecdf(x)) You will notice a sharp turn around x = 2.5 How do I get that value of x using R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] Column of probabilities

2011-08-24 Thread Jim Silverton
Hi all, I have a vector xm say: xm = c(1,2,3,4,5,5,5,6,6) I want to return a vector with the corresponding probabilities based on the amount of times the numbers occurred. For example, I should get the following vector for xm: prob.xm = c(1/9, 1/9, 1/9, 1/9, 3/9, 3/9, 3/9, 2/9, 2/9) Any help

[R] qnorm?

2011-08-23 Thread Jim Silverton
Hi everyone, I have the following problem. I have some small p-values but when I use qnorm(1-4e-30) I get an error. Is there anyway to get around this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] CDFs

2011-08-22 Thread Jim Silverton
Hello all, I have two columns of numbers. I would like to do the following: (1) Plot both cdfs, F1 and F2 on the same graph. (2) Find smoothed approximations of F1 and F2 lets call them F1hat and F2hat (3) Find values for F1hat when we substitue a value of x in it. (4) Find the corresponding

[R] Changing data scales

2011-08-21 Thread Jim Silverton
I have data that ranges from 0.3 to 2 and I want to change the scale to be from 0 to 1. Can this be done in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Gradients and fitting curves in R

2011-08-15 Thread Jim Silverton
Hello all, I have some points for x and f(x). I want to fit the best curev through these points and find the value of x and f(x) for which the gradient is -1. Anyone knows if this can be done in R? -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Finite Differences in R

2011-08-09 Thread Jim Silverton
I have two column of points y and x. I want to use finite differences to find the largest gradient to the 'smoothed' fitted curve for x and y. Can R do this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] Simulating from the Null

2011-07-31 Thread Jim Silverton
Hello all, I am doing glm with a negative binomial link. I have two treatments and 3 replicates in each treatment. My question is this, how can I simulate data for the the columns from the null and distribution. -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Lowest values in a vector of numbers

2011-07-28 Thread Jim Silverton
I have a vector of numbers, and I will like to find the positions of the lowest 20% of the values. Can anyhow point out how to do this. I tried the ecdf function but to no avail. -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] SNP Tables

2011-07-26 Thread Jim Silverton
Hello, I have indicators for the present of absent of a snps in columns and the categorey (case control column). I would like to extract ONLY the tables and the indices (SNPS) that give me 2 x 3 tables. Some gives 2x 2 tables when one of the allelle is missing. The data look like the matrix snpmat

[R] 2 x 3 table

2011-07-24 Thread Jim Silverton
I am trying to find the likelihood ratio for a 2 x3 table (actually SNP data). I do not want the log likelihood. Is this the correct R code for the following table? Row totals are fixed at 100 each (case control situation). aa Aa AA Total 10 2070 100 20 4050 100

[R] Latex Table Help on R

2011-07-21 Thread Jim Silverton
Hello everyone, Peter (see my earlier post) recommended the following script for finding the means and standard deviations and putting them in table form. However, I would like the standard deviations under the means in brackets. Can anyone check this code to see how this can be adjusted?

Re: [R] Latex Table for means and standard deviations in brackets

2011-07-20 Thread Jim Silverton
Hello all, I am new to xtable. I have several datasets in the form of matrices. Consider the following two simple datasets which are 2 x 3 matrices. The rows in both matrices have the same meaning. For example the first row of both matrices are variable 1 and the second row of both matrices are

Re: [R] Hardy Weinberg Case Control Test in gap R package

2011-07-12 Thread Jim Silverton
Hi, I am using the gap R package to do the Hardy Weinberg Case Control test for many SNP. I am not sure what the values initial1 and initial2 should be for the test. I tried values but they failed. I emailed the author but to no avail. There seems to be some documentation that is deleted at the

Re: [R] Simulating from the null distribution of a 2 x 3 table

2011-07-09 Thread Jim Silverton
to a certain point and is there a function which can give the unique tables? Jim On Thu, Jul 7, 2011 at 4:29 AM, peter dalgaard pda...@gmail.com wrote: On Jul 7, 2011, at 05:01 , Thomas Lumley wrote: On Thu, Jul 7, 2011 at 12:58 PM, Jim Silverton jim.silver...@gmail.com wrote: Dear all

Re: [R] Probability calculation....

2011-07-06 Thread Jim Silverton
Hello, I have the following 2 x 3 contingency table, 12 3 Case12 13 15 Control 10 5 10 I want to find min(x1,x2,x3) P(X=x) where P(X=x) = ( (22 Choose x1) * (18 Choose x2) * (25 Choose x3) ) / (62 Choose 40) If I have 100 such 2 x 3 tables can I find this

Re: [R] Simulating from the null distribution of a 2 x 3 table

2011-07-06 Thread Jim Silverton
Dear all, I want to simulate from the null distribution of the following 2 x 3 table, 2 5 10 4 8 5 I am using a chi-squared test. Anyone has any idea how to do this? -- Thanks, Jim. [[alternative HTML version deleted]] __

[R] Hardy Weinberg Simulation

2011-06-27 Thread Jim Silverton
Hello, I am trying to simulate 10 relicates of 100-tables. Each table is a 2 x 3 and 80% pf the tables are true nulls and 20% are non-nulls. The nulls follow the Hardy Weinberg distribution (ratio) 1:2:1. I have the code below but the p-values are not what I am expecting. I want to use the

Re: [R] Hardy Weinberg

2011-06-22 Thread Jim Silverton
I am generating 1,000 replicates of 10,000 of these 2 x 3 tables but R cannot seem to save it. Its over 1 Gig. Any ideas on how I can store this large amount of data? Should I use a list or a matrix? Jim On Wed, Jun 22, 2011 at 10:21 PM, Mike Miller mbmille...@gmail.com wrote: On Thu, 23 Jun

Re: [R] Hardy Weinberg

2011-06-21 Thread Jim Silverton
Hello all, I am interested in simulating 10,000 2 x 3 tables for SNPs data with the Hardy Weinberg formulation. Is there a quick way to do this? I am assuming that the minor allelle frequency is uniform in (0.05, 0.25). -- Thanks, Jim. [[alternative HTML version deleted]]

[R] Re; Getting SNPS from PLINK to R

2011-06-20 Thread Jim Silverton
I a using plink on a large SNP dataset with a .map and .ped file. I want to get some sort of file say a list of all the SNPs that plink is saying that I have. ANyideas on how to do this? -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] (no subject)

2011-06-19 Thread Jim Silverton
Hello, Does anyone has software to simulate SNP data? Specifically I would like any package that produces 2 x 3 SNP data. -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Discrete Test in R

2011-06-17 Thread Jim Silverton
I am looking for a discrete test for testing SNP data. Is ther any common ones on the market for the 2 x 3 SNP table? I don't want to use the Chi-square test. -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] Extracting SNP data from database

2011-06-13 Thread Jim Silverton
Hi, I am interested in getting some SNP data. I need a small dataset but it is the extraction of the SNPs in the form of numeric tables that is giving the problems. I would like to extract SNP data for some type of bacteria (haploid). -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Line Graphs

2011-06-06 Thread Jim Silverton
Hello, I want to plot 6 line graphs. I have 10 points 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9 and 1.0. At each point say 0.1, I have 6 variables A, B, C, D, E and F. The variables all have values between 0 and 1 (and including 0 and 1). I also want to label the x axis from 0.1 to 1.0 and the y

Re: [R] cbind 3 or more matrices

2011-06-04 Thread Jim Silverton
How can I cbind three or more matrices like A,B and C. This does not work: cbind(A,B,C) -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Removing rows of zeros from a matrix

2011-06-02 Thread Jim Silverton
Hi, Can someone tell me how to remove rows of zeros from a matrix? For example if I have the following matrix, 0 0 0 1 2 8 0 0 4 56 I should end up with 0 1 2 8 4 56 -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] MAP datafile

2011-06-01 Thread Jim Silverton
Hi, I have a MAP datafile with SNP data and would like to open it and run say fisher's exact test and save the p-values. Anyone has any idea how this can be done? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] matrix Manipulation...

2011-05-25 Thread Jim Silverton
Hello everyone, I have a 2 x 5 matrix: say 0.2 0.3 1 -1 3 0.2. 0.4 5 0.5 -1 I want to replace all the values greater than or equal to 1 with 1 and those less than or equal to 0 with 0. So I should end up with a mtrix looking like: 0.2 0.3 1 0 1 0.2. 0.4 1 0.5 0

Re: [R] Stirlings Approximation

2011-05-09 Thread Jim Silverton
I have some big combinations like: choose 784645433 Can R compute these? Is there any package that does stirlings approximation in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Problems downloading statmod cran package

2011-04-27 Thread Jim Silverton
Hello all, I keep on getting the following error message when I try downloading statmod: install.packages(statmod) Installing package(s) into ‘C:\Users\Isaac\Documents/R/win-library/2.12’ (as ‘lib’ is unspecified) trying URL '

Re: [R] EM vs Bayesian

2011-04-24 Thread Jim Silverton
Hello, Is there any literature there that says that the EM is better/worse than a Baysian model when it comes to differentiating univariate mixture of normal distributions? -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] qvalue

2011-04-18 Thread Jim Silverton
I am using storey's qvalue package but I keep on getting errors. Why is this? qvalue(p, lambda=0.5)$pi0 [1] ERROR: p-values not in valid range. Error in qvalue(p, lambda = 0.5)$pi0 : $ operator is invalid for atomic vectors -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Counting elements in columns

2011-04-16 Thread Jim Silverton
I have two columns and I want to count hwo many pairs I have of the same element. For example. If I have a = c(1,2,3,4,5) b= c(12, 1, 34, 2, 5, 0, 10, 100, 11) It should return 3 (since 1, 2 and 5 occur in both columns). Columns need not be of the same length. -- Thanks, Jim.

Re: [R] Previously attainable fisher's exact test

2011-04-14 Thread Jim Silverton
, 2011 at 3:01 AM, peter dalgaard pda...@gmail.com wrote: On Apr 14, 2011, at 01:29 , (Ted Harding) wrote: On 13-Apr-11 17:40:53, Jim Silverton wrote: I have a matrix say, 1 4 23 30 and I want to find the previously attainable fisher's exact test p-value. Is there a way to do

Re: [R] Removing objects and clearing memory

2011-04-13 Thread Jim Silverton
Hey guys thanks very much for al your responses. It was very helpful. Jim On Tue, Apr 12, 2011 at 6:59 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2011-04-12 15:52, seeliger.c...@epamail.epa.gov wrote: How do I remove all objects except one in R? rm(list=ls()) #will remove ALL objects

Re: [R] Previously attainable fisher's exact test

2011-04-13 Thread Jim Silverton
I have a matrix say, 1 4 23 30 and I want to find the previously attainable fisher's exact test p-value. Is there a way to do this in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Removing objects and clearing memory

2011-04-13 Thread Jim Silverton
On Wed, Apr 13, 2011 at 11:12 AM, Jim Silverton jim.silver...@gmail.comwrote: Hey guys thanks very much for al your responses. It was very helpful. Jim On Tue, Apr 12, 2011 at 6:59 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2011-04-12 15:52, seeliger.c...@epamail.epa.gov wrote: How

Re: [R] Density estimation and plots

2011-04-13 Thread Jim Silverton
I have two columns of data, one is a subset of the other. All the data lie beteen 0 and 1 inclusive. I want to fit both densities on the same graph. I would also like the ability to extract the fitted values of both smoothed density (using the best method of course). For example, if h = c(

[R] Removing objects and clearing memory

2011-04-12 Thread Jim Silverton
How do I remove all objects except one in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Fast version of Fisher's Exact Test

2011-04-08 Thread Jim Silverton
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]] __ R-help@r-project.org mailing list

[R] Fisher's Exact test

2011-04-06 Thread Jim Silverton
Hello, I have a matrix, X2 ith 2 columns and I want to do the fisher's exact test on each row. However, it is too slow and I would like to use the sage.testsage command from the library called sage.test(datasnp[,1], datasnp[,2], n1 =100, n2 =100) -- Thanks, Jim. [[alternative HTML

[R] Fisher exact test approximation?

2011-04-06 Thread Jim Silverton
Hello, I have a matrix, X2 ith 2 columns and I want to do the fisher's exact test on each row. However, it is too slow and I would like to use the sage.testsage command from the library called (sagenhaft). I used: sage.test(X2[,1], X2[,2], n1 =100, n2 =100) but the pvalues histograms does not

Re: [R] Changing parameter in local fdr R code

2011-04-05 Thread Jim Silverton
I am using Efron's local fdr procedure. But, I want to change the null from N(0,1) to N(0, 0.002). I can access the function but I have no idea what to change. In other words, I want nulltype to be N(0,0.002) instead of N(0,1) in his function. Anyone has any ideas. This is his code for the local

Re: [R] Difference in mixture normals and one density

2011-04-04 Thread Jim Silverton
Hello, I am trying to find out if R can do the following: I have a mixture of normals say f = 0.2*Normal(2, 5) + 0.8*Normal(3,2) How do I find the difference in the densities at any particular point of f and at Normal(2,5)? -- Thanks, Jim. [[alternative HTML version deleted]]

[R] Fisher's test

2011-04-01 Thread Jim Silverton
I have a matrix with 2 columns and I want to do fishers exact test for these with the totals for each row being 100 say. The data has the form: 23 12 32 21 12 2 and these represents the tables: 23 12 77 88 32 21 78 79 12 2 88 98 How do I use apply to speed up aclculation of the

Re: [R] Poisson Regression

2011-03-30 Thread Jim Silverton
Is there R code that can do a Poisson Regression and plot the density of the fitted values? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Plotting the density of a Poisson Regression

2011-03-28 Thread Jim Silverton
I am doing a density plot in R. Spcifically, I want to do a Poisson Regression, and plot the fitted values. Anyone knows how this can be sone in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] EM and Mixtools

2011-03-22 Thread Jim Silverton
I have 2 questions concerning the EM algorithm. Is it true that the EM algorithm gives unique answers for the means and variances of a mixture of 2 normals? I am using mixtools and I am surprised that it works better than a Bayesian program I wrote. If so can someone say why the mixing

Re: [R] Part of density plot not showing up

2011-03-21 Thread Jim Silverton
I am doing a histogram with 2 superimposed densities. However, the density of one of the graphs is not coming out..its being erased.. Any ideas on how to fix this problem? -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] Part of a density plot

2011-03-19 Thread Jim Silverton
Suupose I have y - rbeta(1, 2, 5) and I only want to see only the density plot from x = 0 to x = 1 How do I do this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Counting

2011-03-17 Thread Jim Silverton
I have a matrix say: 23 1 12 12 00 0 1 0 1 0 2 23 2 I want to count of number of distinct rows and the number of disinct element in the second column and put these counts in a column. SO at the end of the day I should have: c(1, 1, 1, 2, 2, 1, 1) for the distinct rows and c(1, 1,

[R] Re; Fitting a Beta distribution

2011-03-16 Thread Jim Silverton
I want to fit some p-values to a beta distribution. But the problem is some of the values have 0s and 1's. I am getting an error if I use the MASS function to do this. Is there anyway to get around this? -- Thanks, Jim. [[alternative HTML version deleted]]

Re: [R] Combinations

2011-02-27 Thread Jim Silverton
any idea how to get R to compute a combination like (54323456, 2345) ? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Fiting a beta distribution in R

2011-02-21 Thread Jim Silverton
Is there any R package that can fit a beta distribution in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] A list within a list?

2011-02-05 Thread Jim Silverton
Hello, I am planning of building a list of lists specifically, my first list is some what of the sort: lidta - list(m, p, r, s, q, A, B) where A and B are matrices that may be of different number of rows . The number of rows in matrix A and matrix B depends on the the values of m. The question

Re: [R] Direchlet Process Simulation

2011-01-13 Thread Jim Silverton
Hello, I am looking for a simulator for the Dirichlet Process SImulator. Can you advise me if R has one? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Rcode

2010-12-03 Thread Jim Silverton
Hello everyone, I am not too sure if any of you are familiar with simulating RNA-seq data. I am interested in simulating data to perform Fisher's Exact Test. Can you help? -- Thanks, Jim. [[alternative HTML version deleted]] __

Re: [R] Adding noise

2010-11-30 Thread Jim Silverton
Hello, I have some discrete pvalues and I would like to sort them. Then add random noise so that they are ordered the same way as the original pvalues. Off course I don't want any pvalues less than 0 or greater than 1. Any ideas on how to do this in R? -- Thanks, Jim. [[alternative HTML

Re: [R] Updating R packages

2010-11-12 Thread Jim Silverton
I have been trying to update some R packages but I get the following error. Can you advise how mow to get around this . I am using the R for 64 bit windows. --- Please select a CRAN mirror for use in this session --- Warning in install.packages(update[instlib == l, Package], l, contriburl =

Re: [R] Constrained Regression

2010-10-31 Thread Jim Silverton
Hello everyone, I have 3 variables Y, X1 and X2. Each variables lies between 0 and 1. I want to do a constrained regression such that a0 and (1-a) 0 for the model: Y = a*X1 + (1-a)*X2 I tried the help on the constrained regression in R but I concede that it was not helpful. Any help is greatly

Re: [R] Constrained Regression

2010-10-31 Thread Jim Silverton
library(quadprog); res - solve.QP(Dmat, dvec, Amat, bvec, meq) zapsmall(res$solution) # zapsmall not really needed in this instance [1] 0.1163065 0.8836935 -- David. Spencer On 10/31/2010 9:01 AM, David Winsemius wrote: On Oct 31, 2010, at 2:44 AM, Jim Silverton wrote: Hello

Re: [R] Bayesian constrained regression method?

2010-10-22 Thread Jim Silverton
Hello everyone, I am trying to estimate the parameter b. I have Y and X1 which I know and they are both random. However, I also have X2 which I don't know and is also random. I want to estimat b from the model: Y = b*X1 + ( 1 - b ) * X2 Can anyone offer some suggestions. The values of Y and X1

Re: [R] Counting unique items in a list of matrices

2010-10-07 Thread Jim Silverton
Hello, I gave a list of 2 x 2 matrices called matlist. I have about 5000 2 x 2 matrices. I would like to count how many of each 2 x 2 unique matrix I have. So I am thinking that I need a list of the unique 2 x 2 matrices and their counts. Can anyone help. -- Thanks, Jim. [[alternative

Re: [R] R Code for paper?

2010-09-30 Thread Jim Silverton
Does anyone has the Rcode for Gilbert's 2005 paper on the discrete FDR and Tarone's 1990 paper? And Storey's pFDR? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Simulation

2010-09-10 Thread Jim Silverton
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

Re: [R] Bayesian Code for contingency tables

2010-06-22 Thread Jim Silverton
Hello, Is there anywhere I can find some Bayesian Code for 2 by 2 tables or even the non-central hypergeometric distribution in R? Packages would be helpful but the actual coding in R is much better. Thanks, Thanks Jim [[alternative HTML version deleted]]

Re: [R] Copulas

2010-04-08 Thread Jim Silverton
I want to fit a bivariate copula to bivariate data. Then I want to draw a straight line on the copula. Then I want to retrieve those origianl pairs (X.Y) which were above the line. Any ideas how to do this? Thanks, Jim [[alternative HTML version deleted]]

Re: [R] Affymetrix Cancer Dataset

2010-03-24 Thread Jim Silverton
I am looking for an online (easily accessible) form of the samples of genetic data for those with cancer and those without cancer. Can anyone direct me in the right place? Thanks, Jim [[alternative HTML version deleted]] __

Re: [R] Effect Size Formaula and Calulations in R

2010-03-16 Thread Jim Silverton
Hello, I would like to find out how to use R to compute the effect size of two samples for a two sample t test. Is there a formula for the fisher's exact test? Any R code and/or formula would be greatly appreciated. Thanks, Jim [[alternative HTML version deleted]]

  1   2   >