Answered

How do I get MATLAB to display the d' when my hit rate = 1 using the norminv function?

No, d' cannot be computed when an observed hit_rate is 1 or fa_rate is zero. One of the most common work-arounds for this probl...

How do I get MATLAB to display the d' when my hit rate = 1 using the norminv function?

No, d' cannot be computed when an observed hit_rate is 1 or fa_rate is zero. One of the most common work-arounds for this probl...

7 months ago | 0

Answered

How to delete some of anonymous variables randomly?

One way to approach the problem is to write a function f(x) where x is a vector with 47 positions. When you call f, put numeric...

How to delete some of anonymous variables randomly?

One way to approach the problem is to write a function f(x) where x is a vector with 47 positions. When you call f, put numeric...

7 months ago | 0

| accepted

Answered

Random Laplacian distribution in a specified interval

Here is a quick and dirty way to do this with Cupid: location = 0; % set whatever Laplacian parameters you want. scale = 1; ...

Random Laplacian distribution in a specified interval

Here is a quick and dirty way to do this with Cupid: location = 0; % set whatever Laplacian parameters you want. scale = 1; ...

7 months ago | 0

| accepted

Answered

kstest for uniform distribution

you can test for the fit of a discrete distribution, including uniform, with chi2gof. One of the examples (about 1/3 of the way...

kstest for uniform distribution

you can test for the fit of a discrete distribution, including uniform, with chi2gof. One of the examples (about 1/3 of the way...

7 months ago | 1

| accepted

Answered

How to remove the outliers in distribution fitter

If you click on the "Exclude" button in the picture you posted, you will get the option to set lower and upper limits to exclude...

How to remove the outliers in distribution fitter

If you click on the "Exclude" button in the picture you posted, you will get the option to set lower and upper limits to exclude...

7 months ago | 1

Answered

Bootstrap multi linear model

The problem is that fitlm produces a complicated output structure and bootstrp doesn't know what to do with it. x = (1:1000)'; ...

Bootstrap multi linear model

The problem is that fitlm produces a complicated output structure and bootstrp doesn't know what to do with it. x = (1:1000)'; ...

7 months ago | 0

| accepted

Answered

How Can I simulate Data for Least-Squares Variance Component Estimation (LS-VCE) for Multiple regression?

You could use mvnrnd to generate random values of x1-x4. Is that what you need?

How Can I simulate Data for Least-Squares Variance Component Estimation (LS-VCE) for Multiple regression?

You could use mvnrnd to generate random values of x1-x4. Is that what you need?

8 months ago | 0

Answered

How to group data for MANOVA1 analysis

84*84 is not going to work, sorry. For MANOVA, you need to have more cases in each group than the number of variables. Some pos...

How to group data for MANOVA1 analysis

84*84 is not going to work, sorry. For MANOVA, you need to have more cases in each group than the number of variables. Some pos...

8 months ago | 0

Answered

How to test if values are close togather using p-value (ttest)

A small p value means that the data are incompatible with some underlying assumption/model. For example, you could potentially ...

How to test if values are close togather using p-value (ttest)

A small p value means that the data are incompatible with some underlying assumption/model. For example, you could potentially ...

8 months ago | 0

Answered

Finding the minimum of a complicated function with variables and parameters

If I understand the problem correctly, then this should be close to what you want: function bestEsts = MyOuterFn(x,y) MyErrFn ...

Finding the minimum of a complicated function with variables and parameters

If I understand the problem correctly, then this should be close to what you want: function bestEsts = MyOuterFn(x,y) MyErrFn ...

8 months ago | 0

Answered

How to get correct p-values for the Steel-Dwass test?

The problem is with the 'inf' value given as the degrees of freedom in this line p_steelDwass(i, 1) = 1 - tcdf(t_steelDwass...

How to get correct p-values for the Steel-Dwass test?

The problem is with the 'inf' value given as the degrees of freedom in this line p_steelDwass(i, 1) = 1 - tcdf(t_steelDwass...

8 months ago | 0

Answered

How to calculate for significant difference between Cohen's Kappa values?

As I understand it, the fundamental question is whether tests A & B agree better than tests A & C, beyond a minor improvement th...

How to calculate for significant difference between Cohen's Kappa values?

As I understand it, the fundamental question is whether tests A & B agree better than tests A & C, beyond a minor improvement th...

8 months ago | 0

Answered

fsolve doesn't find a solution when the value of the objective function is obtained through a Montecarlo simulation

I don't know if it can be done in the context of your simulation, but sometimes it is helpful to pick the "random" variables sys...

fsolve doesn't find a solution when the value of the objective function is obtained through a Montecarlo simulation

I don't know if it can be done in the context of your simulation, but sometimes it is helpful to pick the "random" variables sys...

8 months ago | 0

Question

speed up integrating the same function over many overlapping intervals?

I need to compute many different integrals of the same function fn, essentially like this: Xint = size(X); for i=1:numel(X) ...

8 months ago | 2 answers | 0

Answered

Differences between functions ezfit and Matlab's gamfit in fitting data to the gamma distribution?

There are two somewhat different parameterizations of the gamma distribution. In one (which I think is used by gamfit), the mean...

Differences between functions ezfit and Matlab's gamfit in fitting data to the gamma distribution?

There are two somewhat different parameterizations of the gamma distribution. In one (which I think is used by gamfit), the mean...

8 months ago | 0

Answered

How do I calculate the R^2?

Either of these: Rsqr = corr(x(:,2),y)^2; RsqrAlso = 1-(std(resids)/std(y))^2;

How do I calculate the R^2?

Either of these: Rsqr = corr(x(:,2),y)^2; RsqrAlso = 1-(std(resids)/std(y))^2;

8 months ago | 1

Answered

I would like to find elements of a matrix that fulfill a condition but after every loop the condition is changing.

I think this will almost do what you want. edges = 0:0.05:30; [~,~,bin_numbers] = histcounts(diameters,edges); The output bin...

I would like to find elements of a matrix that fulfill a condition but after every loop the condition is changing.

I think this will almost do what you want. edges = 0:0.05:30; [~,~,bin_numbers] = histcounts(diameters,edges); The output bin...

8 months ago | 0

| accepted

Answered

Generating a categorical array with group names

Is this what you are after? part1 = repmat({'Name1'},1055,1); part2 = repmat({'Name2'},1641,1); part3 = repmat({'Name3'},2055...

Generating a categorical array with group names

Is this what you are after? part1 = repmat({'Name1'},1055,1); part2 = repmat({'Name2'},1641,1); part3 = repmat({'Name3'},2055...

8 months ago | 0

| accepted

Answered

Forming a CDF by adding different types of PDF and generating random number

It seems like there are several different questions here. If you want to generate random numbers from a custom CDF, one simple ...

Forming a CDF by adding different types of PDF and generating random number

It seems like there are several different questions here. If you want to generate random numbers from a custom CDF, one simple ...

9 months ago | 2

| accepted

Answered

Calculating pdf and cdf for data extracted as a table

This command pdfwindspeed = pdf('Normal',A) returns the pdf of the A values within the standard normal with mu=0 and sigma=1. ...

Calculating pdf and cdf for data extracted as a table

This command pdfwindspeed = pdf('Normal',A) returns the pdf of the A values within the standard normal with mu=0 and sigma=1. ...

9 months ago | 0

Answered

How to use one data set to find the mean of another?

NON1 = NON == 1; % this makes a boolean vector that is true for the positions where NON==1 mean(PLCm(NON1)); % this computes ...

How to use one data set to find the mean of another?

NON1 = NON == 1; % this makes a boolean vector that is true for the positions where NON==1 mean(PLCm(NON1)); % this computes ...

9 months ago | 1

Question

Request for help computing convolution of random variables via fft

Inspired by the answers of @David Goodmanson to this earlier question, I have been trying to understand exactly how in general t...

9 months ago | 2 answers | 0

Answered

run glmfit , why get Warning: X is ill conditioned, or the model is overparameterized

The problem is that the x1-x5 values sum to 24 in every row. This means that any one of the x's can be predicted from the rest ...

run glmfit , why get Warning: X is ill conditioned, or the model is overparameterized

The problem is that the x1-x5 values sum to 24 in every row. This means that any one of the x's can be predicted from the rest ...

9 months ago | 0

| accepted

Answered

CDF of VOn Mises distribution

The Von Mises distribution is included in Cupid. You could use it like this to calculate CDF values: >> location = 10; >> conc...

CDF of VOn Mises distribution

The Von Mises distribution is included in Cupid. You could use it like this to calculate CDF values: >> location = 10; >> conc...

9 months ago | 0

Answered

How do I get four different answers guaranteed generated randomly from several arrays?

One way is to put the two random selections inside a while loop, check whether any meals are repeated, and then only exit the lo...

How do I get four different answers guaranteed generated randomly from several arrays?

One way is to put the two random selections inside a while loop, check whether any meals are repeated, and then only exit the lo...

9 months ago | 0

| accepted

Answered

How to load .mat data from another folder?

You need the folder name at the beginning of the string you pass to load, maybe something like this: for iFile = 1:numel(N1) ...

How to load .mat data from another folder?

You need the folder name at the beginning of the string you pass to load, maybe something like this: for iFile = 1:numel(N1) ...

9 months ago | 1

Answered

Probplot for Generalized Extreme Value distribution

Cupid includes the Frechet distribution. It doesn't have probplot function, but you can easily produce something similar: % as...

Probplot for Generalized Extreme Value distribution

Cupid includes the Frechet distribution. It doesn't have probplot function, but you can easily produce something similar: % as...

9 months ago | 0

| accepted

Answered

How to NOT share variable with nested function?

It sounds like your "big code" is a script rather than a function, but now you want to make a function out of it. I suggest you...

How to NOT share variable with nested function?

It sounds like your "big code" is a script rather than a function, but now you want to make a function out of it. I suggest you...

9 months ago | 0

Answered

How to plot confidence bounds for a theoretical cumulative distribution function?

For a given X value, the theoretical cumulative probability is p = F(X). Suppose you have a sample of N observations and you le...

How to plot confidence bounds for a theoretical cumulative distribution function?

For a given X value, the theoretical cumulative probability is p = F(X). Suppose you have a sample of N observations and you le...

9 months ago | 0

Answered

How to loop through variable names and to save them on one file?

You can use strings for variable names like this: a = 'WD__Avr'; for.... [...] x = mean(data_measured.(a)(ind_time)); % no...

How to loop through variable names and to save them on one file?

You can use strings for variable names like this: a = 'WD__Avr'; for.... [...] x = mean(data_measured.(a)(ind_time)); % no...

10 months ago | 0

| accepted