Answered

Nested function in optimisation

Is this what you are trying to compute? PitchRAO = exp(PitchLogRAO);

Nested function in optimisation

Is this what you are trying to compute? PitchRAO = exp(PitchLogRAO);

6 días ago | 0

Answered

Defining a parameter which depends on image luminance distribution function?

If I understand you correctly, I think you want this: L = quantile(B,0.1); if L <= 50 alpha = 0; elseif L >= 50 && L <...

Defining a parameter which depends on image luminance distribution function?

If I understand you correctly, I think you want this: L = quantile(B,0.1); if L <= 50 alpha = 0; elseif L >= 50 && L <...

9 días ago | 0

Answered

How to get standard errors from copulafit

You could estimate it by taking bootstrap samples from u.

How to get standard errors from copulafit

You could estimate it by taking bootstrap samples from u.

13 días ago | 0

Answered

Help with linear mixed effects model formula

That model is appropriate if you want to assume these things (in addition to normality, independence, etc): (a) subjects diff...

Help with linear mixed effects model formula

That model is appropriate if you want to assume these things (in addition to normality, independence, etc): (a) subjects diff...

14 días ago | 0

| accepted

Answered

fminsearch and simulated annealing with penalties

It depends a little on exactly what relations you want to impose, but often you can do this by mapping MATLAB's real-number para...

fminsearch and simulated annealing with penalties

It depends a little on exactly what relations you want to impose, but often you can do this by mapping MATLAB's real-number para...

14 días ago | 0

Answered

Converting R code into Matlab code

I think MATLAB has a built-in function that you can use instead of the R for loop. Try just: newSpeed= speed-mean(speed)+33.02...

Converting R code into Matlab code

I think MATLAB has a built-in function that you can use instead of the R for loop. Try just: newSpeed= speed-mean(speed)+33.02...

19 días ago | 0

Answered

fsolve - function with two input arguments

function b = find_b(knownX, knownA, guessForB) fun = @(b) pfun2(knownA,b) - knownX; b = fzero(fun,guessForB); end De...

fsolve - function with two input arguments

function b = find_b(knownX, knownA, guessForB) fun = @(b) pfun2(knownA,b) - knownX; b = fzero(fun,guessForB); end De...

24 días ago | 0

| accepted

Answered

Fit a parameter to minimise a correlation between two vectors

% Some fake data to use in testing: % Presumably you have your own values for these. nExpts = 10; C = rand(nExpts,1); V1 = r...

Fit a parameter to minimise a correlation between two vectors

% Some fake data to use in testing: % Presumably you have your own values for these. nExpts = 10; C = rand(nExpts,1); V1 = r...

24 días ago | 1

Answered

Cascading a User Definable number S Parameter objects together

Maybe this? n = input('Input number of files to be imported & cascaded:\n'); SPara= cell(1,n); for x = 1:n SPara{x} = sp...

Cascading a User Definable number S Parameter objects together

Maybe this? n = input('Input number of files to be imported & cascaded:\n'); SPara= cell(1,n); for x = 1:n SPara{x} = sp...

28 días ago | 0

Answered

Help with finding the average correlation coefficient between a matrix value and its surrounding neighbors?

A correlation isn't designed to measure the similarity between two isolated values, like your given (i,j) element and each of it...

Help with finding the average correlation coefficient between a matrix value and its surrounding neighbors?

A correlation isn't designed to measure the similarity between two isolated values, like your given (i,j) element and each of it...

alrededor de 1 mes ago | 1

Answered

calculate a P value using a permutation test

This contribution on file exchange looks like it will do what you want.

calculate a P value using a permutation test

This contribution on file exchange looks like it will do what you want.

alrededor de 1 mes ago | 0

Answered

Looping through a large questionnaire set, creating new tables

I hate to say this, but it might be easiest to do a lot of the work in Excel. Note that the data in your screenshot are represe...

Looping through a large questionnaire set, creating new tables

I hate to say this, but it might be easiest to do a lot of the work in Excel. Note that the data in your screenshot are represe...

alrededor de 2 meses ago | 0

| accepted

Answered

Generate correlated random variables in a wider domain

It looks like 3.15 and 3.4 are the maximum values in the generalized extreme value and pareto distributions with the parameters ...

Generate correlated random variables in a wider domain

It looks like 3.15 and 3.4 are the maximum values in the generalized extreme value and pareto distributions with the parameters ...

alrededor de 2 meses ago | 0

Answered

Weibull fit to interval censored data

You can do this with Cupid. Here is an example: % Generate some truncated Weibull data just to have an example % of some data ...

Weibull fit to interval censored data

You can do this with Cupid. Here is an example: % Generate some truncated Weibull data just to have an example % of some data ...

2 meses ago | 0

Answered

Efficient code for obtaining the probability of X or less, when the PDF is known, but the CDF cannot be expressed precisely

Unless you have closed form or a good approximation to the CDF, it seems like your only option is to integrate the PDF with MATL...

Efficient code for obtaining the probability of X or less, when the PDF is known, but the CDF cannot be expressed precisely

Unless you have closed form or a good approximation to the CDF, it seems like your only option is to integrate the PDF with MATL...

3 meses ago | 1

Answered

Compare Betas from two different GLMS

You might compare confidence intervals. For example, the estimated value for evidence control is .62033. Compute an approximate...

Compare Betas from two different GLMS

You might compare confidence intervals. For example, the estimated value for evidence control is .62033. Compute an approximate...

3 meses ago | 0

Answered

How can I simulate data from two different distribution using Copulas?

OK, then I think you are almost there. You have the data X, Y, and rhoXY. Start by estimating the parameters for your gamma an...

How can I simulate data from two different distribution using Copulas?

OK, then I think you are almost there. You have the data X, Y, and rhoXY. Start by estimating the parameters for your gamma an...

3 meses ago | 0

| accepted

Answered

How can I simulate data from two different distribution using Copulas?

The question is a little confusing because the U values are from 0 to 1 but the Q values aren't. Q(1,:) looks like a gamma but ...

How can I simulate data from two different distribution using Copulas?

The question is a little confusing because the U values are from 0 to 1 but the Q values aren't. Q(1,:) looks like a gamma but ...

3 meses ago | 0

Answered

seed for Monte Carlo

It sounds like you would be better off not to set the seed at all--just use MATLAB's default seed, which is different every time...

seed for Monte Carlo

It sounds like you would be better off not to set the seed at all--just use MATLAB's default seed, which is different every time...

3 meses ago | 0

Answered

Running repeated anova on all elements of large matrix

If you really just want the F value, you can probably get it much faster by looking up the formulas for the one-factor within-Ss...

Running repeated anova on all elements of large matrix

If you really just want the F value, you can probably get it much faster by looking up the formulas for the one-factor within-Ss...

3 meses ago | 0

| accepted

Answered

Generate column of random numbers that change slowly from row to row

You might generate the random points as you have but then smooth them with the smooth or filter function, e.g., sprob = zeros(s...

Generate column of random numbers that change slowly from row to row

You might generate the random points as you have but then smooth them with the smooth or filter function, e.g., sprob = zeros(s...

3 meses ago | 0

| accepted

Answered

What the two columns represnt when i generate a multivarite normal random numbers

The two columns represent the two variables measured for each case, and the N rows represent the N randomly selected cases from ...

What the two columns represnt when i generate a multivarite normal random numbers

The two columns represent the two variables measured for each case, and the N rows represent the N randomly selected cases from ...

3 meses ago | 0

| accepted

Answered

Fitting a non-linear model to my data

Take logs and use multiple regression. That is, fit the model log(y) = a log(x1) + b log(x2) etc This will give you the best ...

Fitting a non-linear model to my data

Take logs and use multiple regression. That is, fit the model log(y) = a log(x1) + b log(x2) etc This will give you the best ...

3 meses ago | 1

| accepted

Answered

Integrating a t-test into a function how-to

Put in a breakpoint at the ttest2 line and check the inputs x and y that you are passing. These must not be what ttest2 expects...

Integrating a t-test into a function how-to

Put in a breakpoint at the ttest2 line and check the inputs x and y that you are passing. These must not be what ttest2 expects...

3 meses ago | 0

Answered

Fit Gaussian mixture model with weighted observations

It's not exactly clear (to me either) what it means to weight the different observations in this context, but maybe you have som...

Fit Gaussian mixture model with weighted observations

It's not exactly clear (to me either) what it means to weight the different observations in this context, but maybe you have som...

3 meses ago | 0

Answered

Convolution of two different pdf (uniform and normal distribution)

The Cupid toolbox will do this. For example, u = Uniform(0,100); n = Normal(100,10); % 2nd parameter is sigma, not sigma^2 c...

Convolution of two different pdf (uniform and normal distribution)

The Cupid toolbox will do this. For example, u = Uniform(0,100); n = Normal(100,10); % 2nd parameter is sigma, not sigma^2 c...

3 meses ago | 0

| accepted

Answered

Within- & between-subjects in 'anovan'

I also found the lack of between/within terminology a bit daunting. With respect to your first question, here is an example tha...

Within- & between-subjects in 'anovan'

I also found the lack of between/within terminology a bit daunting. With respect to your first question, here is an example tha...

3 meses ago | 1

Question

any trick to stop fminsearch early?

I am using fminsearch to minimize an error score in fitting a model to many, many data sets. Often, the error score gets close ...

3 meses ago | 2 answers | 0

Answered

How can I introduce a known autocovariance to a lognormal process

You should be able to do it by generating your sequence one element at a time, if you can't find a canned routine that will do i...

How can I introduce a known autocovariance to a lognormal process

You should be able to do it by generating your sequence one element at a time, if you can't find a canned routine that will do i...

3 meses ago | 0