Answered
Sampling based on a correlation matrix for multiple parameters?
Use mvnrnd for this. The parameter mu is a vector of the means for your p's, i.e. mu = [1800, 900, etc]. The parameter sigma i...

7 years ago | 1

| accepted

Answered
bootstrap confidence intervals on MDS data?
I'm guessing that you have some starting dataset, D1, and that your code sequence looks something like this: DforMDS = someFunc...

7 years ago | 0

Answered
How to pass a class name as argument to a function
I think the first classdef ("Aclass") works fine, as long as you pass to its constructor the handle of the class you want instan...

7 years ago | 0

| accepted

Answered
HOW to calculate the regression coefficient and p-value between Y and x, while excluding the effect of other variable?
There are different ways to do this, depending on what you mean by "removing the effect of z". One possibility: use regression ...

7 years ago | 1

Answered
generating random numbers from mixed beta gamma distribution
Here is one way to do this with Cupid % Create a custom mixture distribution: % Use whatever distribution parameters and mixtu...

7 years ago | 1

Answered
How can i sample from a distribution already fitted with allfitdist?
Try output = random(My(2).result,10000,1) Your command gives a 10000 x 10000 output matrix.

7 years ago | 0

| accepted

Answered
HOW TO SEPARATE NUMERICAL DATA FROM A TEXTFILE?
Sorry, I misunderstood completely. Maybe this will do what you want: level1 = mod(1:507,3)==1; level1_medians = median_height...

7 years ago | 0

Answered
HOW TO SEPARATE NUMERICAL DATA FROM A TEXTFILE?
mydata = readtable('1Oct6AM.txt','Headerlines',16); mymedians = CondMedians(mydata,'Var13','Var1') gives mymedians = Va...

7 years ago | 0

Answered
Significance test for least squares line
Look at the regress command. You will want something like: [b,bint,r,rint,stats] = regress(Wind,Year); stats will contain the...

7 years ago | 0

| accepted

Answered
Zero-Inflated and Hurdle Models in Matlab (statistical distribution fitting)
You might be able to fit the distributions you have in mind using Cupid. For example, the following commands would define and p...

7 years ago | 2

| accepted

Answered
Checking Conditions on Multiple-Variable Functions
Try fminsearch. Write a global error function to sum up the deviations from all conditions you want to satisfy, and fminsearch w...

7 years ago | 0

| accepted

Answered
Global fitting with one shared paramenter
> I did not undertand how to specify that the parameters for the fitting [b(1) and b(2)] can be different > among the 4 dataset...

7 years ago | 0

| accepted

Answered
HistFit with skewness and kurtosis
All normals have skewness=0, so histfit can't give you a normal that matches the skewness in your data. You'll have to try fitt...

7 years ago | 0

Answered
Fitting Log Pearson Type III distribution in MATLAB
I think you can make a Log Pearson III distribution and estimate its parameters with the routines in Cupid . The attached demo ...

7 years ago | 0

Answered
Standar Errors for variance components of non-linear mixed effect models
One way is to use the bootstrp function. For each bootstrap sample, you would write your own function to call nlmefit and save ...

7 years ago | 0

| accepted

Answered
How to interpret statistics from glmfit
For interpreting the b values from a logistic regression, this pretty detailed explanation might be helpful.

7 years ago | 2

| accepted

Answered
How to plot Central/Non-central chi square pdf?
You need to estimate the distribution parameter(s) from your 1000 data values (call them x). In principle you would use fitdist...

7 years ago | 1

Answered
Why does my log-normal distribution not fit my data?
The probability density function should only approximate the histogram in shape, not in height. Remember, the PDF is defined su...

7 years ago | 0

Answered
How to get the combinations of elements of two arrays?
You might like allcomb on File Exchange: For example: >> A = [1,2,3]; B = [4,5]; >> C=allcomb(A,B) C = 1 4 1...

7 years ago | 2

Answered
OLS regression : Test if two individually not significant coefficients are significant taken altogether
Make a reduced X matrix with just Gas & Solar, then use LinearModel.fit to predict Y from those two predictors. The resulting O...

7 years ago | 0

| accepted

Answered
So whenever I run this program, which is a model of the saturn V rocket going into space. The plot will reset and overlay another plot on top of the other. I don't know how to explain it well so I hope if you run the program you can see my problem.
Look at Rocket(:,1). It starts at 0 and goes up to 1000 by 10. Then it restarts and goes up to 1000 by 1. Then it restarts...b...

7 years ago | 1

| accepted

Answered
Determine goodness of fit for user defined PDF data.
The measures you list (SSE, R-square, etc) are not measures of the goodness of fit of a PDF to a data set. You can find a helpf...

7 years ago | 0

Answered
Finding PDF for difference of two PDFs
1) What do you mean when you say "I did the convolution, and got an array of values"? It sounds a bit like you are using MATLAB...

7 years ago | 0

Answered
makedist discrete uniform distribution
It appears that MATLAB will only give you random integers 1..K for any K you want, so you will have to convert those to your des...

7 years ago | 1

| accepted

Answered
i'm trying to find goodness of fit using chi2gof of a time series data, but getting p value as NAN.
The p value of nan is because the chi-square value has no degrees of freedom. This is because--with such a small number of data...

7 years ago | 1

Answered
Evaluating goodness of fit of a probability distribution at a certain interval
Do you want to rescale the pdf back like this? pd=makedist('normal','mu',1,'sigma',1); pd_trunc=truncate(pd,0,mean(asdf)) plo...

7 years ago | 0

Answered
How to use copula Distribution Parameter to Find Marginal Distributions?
I don't really know the answer to this, but it might help you to know that what you are looking for is called a "conditional" ra...

7 years ago | 0

Answered
Estimating a parameter vector of a maximum likelihood function
One way to proceed is to write a function which accepts a set of values for alpha, epsilon, mu, and delta, and returns -log(L) u...

7 years ago | 1

| accepted

Answered
Why is the pvalue 0
There are a few problems. The biggest one is that the p value depends on the observed correlation value, and this will vary rand...

7 years ago | 0

Load more