Answered
Regression using 1x6 table with 500x20 double elements
I'm not sure I fully understand your question, but maybe this will help: If you want one alpha and five betas for each of the 50...

7 years ago | 0

| accepted

Answered
Calculating Residual Values in a Regression
In MATLAB's linearmodel.fit command, x is the first parameter and y is the second. You have them reversed.

7 years ago | 2

| accepted

Answered
How can I draw these rectangles in a loop using psychtoolbox... there must be a better way than what I've done. Thanks for your help!!
One simple improvement is to make r a cell array. Add a command at the top like r=cell(17,1); Then, instead of commands ...

7 years ago | 0

| accepted

Answered
problem with using randsample
When the first parameter of randsample is a single number k, the assumption is that you want a random sample from the integers 1...

7 years ago | 1

| accepted

Answered
What are the mathematical formulas to compute 95% confidence interval of the estimated parameters (Poisson, Negative Binomial, Lognormal) when using poissfit, nbinfit, and lognfit?
Confidence intervals for estimated parameters are generally obtained using <https://en.wikipedia.org/wiki/Fisher_information Fis...

7 years ago | 0

Answered
Dummy Variable ased on categorical vars in table
Since you are using a loop on x to go through the table one row at a time, you have to index the table variables BS, bank, and D...

7 years ago | 0

Answered
Using regression with constraints on equality of some of coefficients
It sounds like you want the linear regression to estimate 4 coefficients: one each for features 1+5, 2+4, 3, and 6. In that cas...

7 years ago | 0

| accepted

Answered
How can I estimate regression parameters in a model with t-student with 3 d.g.f errors?
I don't think you can fit this model with mvregress, because it only seems to handle normal error scores--not t. This <https://...

7 years ago | 0

Answered
Method to get object based on probability distribution
It is easy using the List distribution in the <https://github.com/milleratotago/Cupid Cupid> toolbox: cw = 10; r = 1:cw;...

7 years ago | 0

Answered
Probability density function plot
Yes, you should be able to do this. You can select a set of x's and then compute each one's pdf using the Fourier inversion. T...

7 years ago | 0

| accepted

Answered
Generating a distribution around a parameter using monte carlo simulation.
The Gaussian distribution has two parameters, mean and standard deviation. Once you decide on values for those, it is easy to g...

7 years ago | 1

| accepted

Answered
How to maximize a function if I have both integer and continuous variables?
Here is an adaptation of fminsearch that allows you to mix both integer and continuous variables: <https://github.com/milleratot...

7 years ago | 0

Answered
Probability computation with MATLAB (involves computing an integral)
To compute the integral part, you basically want a command like: thisintval = integral(@(theta) Re(theta,otherparms),0,inf)...

7 years ago | 0

| accepted

Answered
positive semi-definite matrix
Maybe this link will help: <https://au.mathworks.com/matlabcentral/answers/293735-is-there-any-solution-to-make-positive-semi-de...

7 years ago | 0

Answered
How to generate numbers from probability mass function?
With <https://github.com/milleratotago/Cupid Cupid> you could write: v = [3 7 10]; % the values p = [0.2 0.3 0.5];...

7 years ago | 0

Answered
How to interpret the results from "multcompare" function?
This <http://www.cmaj.ca/content/166/1/65.short article> might help. The key point is this: "A frequently encountered misconcep...

7 years ago | 1

| accepted

Answered
Standard error of Weibull MLE estimates
The standard error is basically 1/4 of the length of the confidence interval.

7 years ago | 1

| accepted

Answered
Quantifying fit of data to distribution
You can do it visually like this: <https://au.mathworks.com/help/stats/compare-multiple-distribution-fits.html?s_tid=answers_rc2...

7 years ago | 0

| accepted

Answered
Parsing varargin for a function called with values only instead of name-value pairs
With <https://au.mathworks.com/matlabcentral/fileexchange/57874-milleratotago-extractnameval ExtractNameVal>, you could include ...

7 years ago | 0

Answered
What is missing from MATLAB?
The editor tab has buttons to comment out the selected lines and to remove comments from the selected lines. In addition, it wo...

7 years ago | 1

Answered
How simulate correlated Poisson distributions
You can do this with the RandGen class in <https://github.com/milleratotago/Cupid Cupid> . The code will look something like th...

7 years ago | 0

Answered
chi square PDF fitting
<https://github.com/milleratotago/Cupid Cupid> will fit the chi-square distribution. For example, if you have a vector of score...

7 years ago | 0

Answered
Finding probability for chi square distribution
x = chi2inv(1-0.001,D)

7 years ago | 1

| accepted

Answered
How to include the standard deviation in the fit and propagate the error?
For this situation, I think you want to minimize this: sum_{i=1}^k [ n_i * (m_i - f_i)^2 / s_i^2 ] , where f_i is the fit...

7 years ago | 0

Answered
Binomial Simulator in Matlab with M= number of experiments
Instead of k(j)=B(1); you need k(j)=sum(B);

7 years ago | 0

| accepted

Answered
Plot the Bivariate Gaussian pdf
normpdf is the univariate normal pdf. You need mvnpdf, which is the multivariate version. Also, plot will not produce a 3d plo...

7 years ago | 0

Answered
How to rewrite normrnd?
function nrmmatrix = nrmrnd(mu, sigma, sz1, sz2) nrmmatrix = mu+sigma*randn(sz1,sz2); end

7 years ago | 1

Answered
Is the value of the coefficient of determination in fitlm.m correct?
I don't have a complete answer, but here are some possibly-relevant observations: 1. Without the constant in the model, the t...

7 years ago | 1

Answered
How can we generate points with an increasing interval?
Try using logspace instead of linspace.

7 years ago | 0

Answered
Which type of sums of squares does ranova use?
I'm not sure whether this really answers your question, but here is part of an email that I received from MATLAB when I asked a ...

7 years ago | 0

Load more