Statistical difference between two curves

I have prey consumption data on two species and I am trying to determine the degree to which their functional response curves differ. Here is a small example of my data (one separate Excel file for each species, the non-native had 6 repetitions for ...
more »

2017-11-25 00:11 (0) Answers

Issue with statistical test

I use the Kolmogorov-Smirnov test to test for normality in a sample. For example, when I do x <- rnorm(1e4, 10, 5) ks.test(x, "pnorm") I get the following result: D = 0.4556, p-value < 2.2e-16 alternative hypothesis: two-sided The p-value...
more »

2017-10-24 13:10 (1) Answers

Multiple t-test comparisons

I would like to know how I can use t.test or pairwise.t.test to make multiple comparisons between gene combinations. First, how can I compare all combinations Gene 1 vs. Gene 3, Gene 3 vs Gene 4, etc.? Second, how would I be able to only compare comb...
more »

2017-09-19 18:09 (2) Answers

Combining two Weibull distributions in R

I am working on a project which involves combining two Weibull distributions and thus creating a double peaked curve. I then aim to make predictions using this. I have searched online and I can't seem to find anything on this or if R has a function t...
more »

2017-08-15 16:08 (1) Answers

apply a rolling mean to a database by an index

I would like to calculate a rolling mean on data in a single data frame by multiple ids. See my example dataset below. date <- as.Date(c("2015-02-01", "2015-02-02", "2015-02-03", "2015-02-04", "2015-02-05", "2015-02-06", "2015-02-07", ...
more »

2017-08-04 00:08 (2) Answers

Efficient calculation of var-covar matrix in R

I'm looking for efficiency gains in calculating the (auto)covariance matrix from individual measurements over time t with t, t-1, etc.. In the data matrix, each row represents an individual and each column represents monthly measurements (the column...
more »

2017-07-12 00:07 (2) Answers

NumPy: calculate cumulative median

I have sample with size = n. I want to calculate for each i: 1 <= i <= n median for sample[:i] in numpy. For example, I counted mean for each i: cummean = np.cumsum(sample) / np.arange(1, n + 1) Can I do something similar for the median wit...
more »

2017-03-13 15:03 (4) Answers

Get area size from geom_area (discrete values)

I would like to get the area under a curve using ggplot2. The problem is that I have just discrete values (measurements, dependent variable) on a continuous scale (time), but measurements are not equally distant. I am not interested in fitting a func...
more »

2017-01-23 14:01 (3) Answers

Grouping rows to minimise deviation

I have a Employee Wages table like this, with their EmpID and their wages. EmpId | Wages ================ 101 | 1280 102 | 1600 103 | 1400 104 | 1401 105 | 1430 106 | 1300 I need to write a Stored Procedur...
more »

2016-09-07 09:09 (2) Answers