statistics

Fitting the cumulative distribution function using MATLAB

拜拜、爱过 提交于 2020-01-06 14:40:59
问题 How is it possible to make the following data more fitted when i will plot using Cumulative_distribution_function? here is my code, plotted using the cdfplot clear all; close all; y = [23 23 23 -7.59 23 22.82 22.40 13.54 -3.97 -4.00 8.72 23 23 10.56 12.19 23 9.47 5.01 23 23 23 23 22.85 23 13.61 -0.77 -14.15 23 12.91 23 20.88 -9.42 23 -1.37 1.83 14.35 -8.30 23 15.17 23 5.01 22.28 23 21.91 21.68 -4.76 -13.50 14.35 23] cdfplot(y) 回答1: There is no definite answer to your question, it is too broad

How to calculate correlation between time periods

拟墨画扇 提交于 2020-01-06 10:10:42
问题 if I have 2 lists of time intervals : List1 : 1. 2010-06-06 to 2010-12-12 2. 2010-05-04 to 2010-11-02 3. 2010-02-04 to 2010-10-08 4. 2010-04-01 to 2010-08-02 5. 2010-01-03 to 2010-02-02 and List2 : 1. 2010-06-08 to 2010-12-14 2. 2010-04-04 to 2010-10-10 3. 2010-02-02 to 2010-12-16 What would be the best way to calculate some sort of correlation or similarity factor between the two lists? Thanks! 回答1: You may try with Cross-Correlation. However, you should be aware that you have vector data

Weibull Distribution parameter estimation error

雨燕双飞 提交于 2020-01-06 08:28:13
问题 I used the following function to estimate the three-parameter Weibull distribution. library(bbmle) library(FAdist) set.seed(16) xl=rweibull3(50, shape = 1,scale=1, thres = 0) dweib3l <- function(shape, scale, thres) { -sum(dweibull3(xl , shape, scale, thres, log=TRUE)) } ml <- mle2(dweib3l, start= list(shape = 1, scale = 1, thres=0), data=list(xl)) However, when I run the above function I am getting the following error. Error in optim(par = c(shape = 1, scale = 1, thres = 0), fn = function (p

How to run a regression which report all factor variables?

寵の児 提交于 2020-01-06 06:55:53
问题 I want to run a regression that calculates the estimated values for all levels of a factor variable. By default, Stata omits one dummy as a base level. When I use the allbaselevels option, it just shows a zero value for a base level: regress adjusted_volume i.rounded_time, allbaselevels SAS shows all the estimated values of categorical variables when the constant has been removed. How can i do the same thing in Stata? 回答1: The option allbaselevels is one of several display options , which can

Report uncertainty: given a mean and the standard error, show only significant figures

依然范特西╮ 提交于 2020-01-06 06:07:27
问题 The intent is to show the result of several observations without unnecessary digits i.e., to display a value with the number of significant digits that is consistent with a given uncertainty. For example, if computed mean=123.45 and err=0.0012345 then the expected output may look like 123450 ± 1.2 (× 10 -3 ) where the following rules are used: the error always has one or two significant digits. Two if the first digit is 1 (ignoring the leading zeros) the mean value is rounded to drop

Fisher's exact test on rows in data frame - R

烈酒焚心 提交于 2020-01-06 04:42:26
问题 I have a data frame of n rows that resembles below (with some extra columns containing additional information not listed): R1counti R1counto R2counti R2counto R1 R2 sample1 100 100 1000 1000 1 1 smaple2 50 100 50 50 0.5 1 For each row, I want to perform a fisher's exact test to determine if the R1 ratio is significantly different from the R2 ratios (and also in the end get an adjusted p-val) Desired output (with the count columns still included in the out): R1 R2 pval sample1 1 1 1 sample2 0

How to calculate p-value for t-test in MATLAB?

前提是你 提交于 2020-01-06 04:12:28
问题 Is there some simple way of calculating of p-value of t-Test in MATLAB. I found something like it however I think that it does not return correct values: Pval=2*(1-tcdf(abs(t),n-2)) I want to calculate the p-value for the test that the slope of regression is equal to 0. Therefore I calculate the Standard Error $SE= \sqrt{\frac{\sum_{s = i-w }^{i+w}{(y_{s}-\widehat{y} s})^2}{(w-2)\sum {s=i-w}^{i+w}{(x_{s}-\bar{x}})^2}}$ where $y_s$ is the value of analyzed parameter in time period $s$, $

How to get statistics in Z3 3.2?

拥有回忆 提交于 2020-01-06 04:00:41
问题 With Z3 2.x I used the SMTLib2 command (get-info statistics) to get statistics of a Z3 run. Using Z3 3.2 I get (error "line _ column _: invalid command argument, keyword expected") for the above, and to (get-info :statistics) Z3 replies with unsupported What's the new way of getting statistics (other than the /st command-line option)? And while we're at it: The INI options page lists (set-option :STATISTICS true) as a valid option, but Z3 3.2 again replies with unsupported 回答1: (get-info :all

What is difference between replicate n times and generate n directly in sampling of R?

本小妞迷上赌 提交于 2020-01-06 02:55:07
问题 I am asked to "simulate x as an independent identically distributed (iid) normal variable with mean=0, std=1.5 with sample length 500" I am doing the sampling in following two ways: set.seed(8402) X <- rnorm(500, 0, 1.5) head(X) and I got -1.8297969 -0.1862884 1.4219400 -1.0841421 -1.5276701 1.6159368 However, if I do X <- replicate(500, rnorm(1,0,1.5)) head(X) and I got -0.04032755 0.92002552 -2.28001943 -1.36840869 1.49820718 0.06205003 My question is what is the right way to generate iid

package to fit mixtures of student-t distributions

狂风中的少年 提交于 2020-01-05 08:27:52
问题 I am looking for a piece of software (python preferred, but really anything for which a jupyter kernel exists) to fit a data sample to a mixture of t-distributions. I searched quite a while already and it seems to be that this is a somehwat obscure endeavor as most search results turn up for mixture of gaussians (what I am not interested here). TThe most promising candidates so far are the "AdMit" and "MitSEM" R packages. However I do not know R and find the description of these packages