Answered
Trouble with glmfit using binomial distribution and logit
The error message is because you have N = ones(size(feature)); so it is of the size of the whole feature array. You jus...

14 years ago | 0

| accepted

Answered
solving general linear models
The mvregress function comes at this a little differently, but it is possible to set up the problem using mvregress. For this sa...

14 years ago | 0

| accepted

Answered
solving general linear models
I think you want C = X\Y if you just need estimates, no other statistical information. If not, please explain specifical...

14 years ago | 0

Answered
trouble in signrank function for R2011b ?
This does look like a bug. If you are comfortable editing code in your MATLAB installation, I recommend editing signrank.m to ch...

14 years ago | 0

| accepted

Answered
How do you obtain a vector of predicted classes generated after cross-valiation of a decision tree?
Consider this: load fisheriris cp = cvpartition(species,'k',10); F = @(xtr,ytr,xtest,ytest){ytest, eval(classregtree(...

14 years ago | 0

| accepted

Answered
How to use rbf_kernel parameters with svmtrain() and svmclassify() for svm classification
From your description, it sounds like you intended svmStruct = svmtrain(data(train,:),groups(train),'kernel_function','rbf'...

14 years ago | 0

Answered
Equal probability in 'randsrc(m,n)' in-built function
I have no idea what your function is or if it does things correctly. But from your description you would not expect exactly 1536...

14 years ago | 0

Answered
Fitting a double exponential cumulative distribution function
You can do most things like this by writing a pdf and calling mle: >> x = [exprnd(1,1000,1); exprnd(5,2000,1)]; >> pdf =...

14 years ago | 0

| accepted

Answered
Demo Weighted Nonlinear Regression (Statistics Toolbox)
Weighted least squares means we want to minimize sum over i of w(i) * {y(i)-yfit(i)}^2 You can write this by multi...

14 years ago | 0

| accepted

Answered
boxplot
This may partially answer what you want. Step 1 would be to take the data for "a" and stretch it out as you describe. Here's one...

14 years ago | 0

| accepted

Answered
boxplot
It seems like 1:46 represents your possible data values and [n1 n2 ... n46] represents the frequency of each value. If you "edit...

14 years ago | 0

Answered
Generate random numbers with specific properties
Not all combinations (X,Y) will work of course. If you do not need a theoretical answer, and are content with something that mig...

14 years ago | 1

| accepted

Answered
Numerical Precision Weak Law of Large numbers
While I don't know exactly what you are encountering, I do know it is sometimes possible to repeat the mean calculation on resid...

14 years ago | 0

Answered
ttest - 2 matrices
Since TTEST wants to work along the first dimension, you can just move that dimension to the front using PERMUTE. Then use SQUEE...

14 years ago | 0

| accepted

Answered
Random numbers in matlab
Are you sure of the sqrt(N) result? I believe you would expect this if you took the square root of the average squared distance ...

14 years ago | 0

Answered
k-means algorithm: start and replicates parameters
The 'start' parameter defines the starting centroids. The 'replicates' parameter indicates how many times to repeat the clusteri...

14 years ago | 2

| accepted

Answered
crossvalind function doesn't work
I'm not sure how you got one toolbox without the other. The Bioinformatics Toolbox is supposed to depend on the Statistics Toolb...

14 years ago | 0

Answered
Why deviance returned by GLMFIT is not = -2*LogLikelihood?
Two things. First, the last argument to binopdf should be the fitted probability, not the fitted counts. Second, the deviance is...

14 years ago | 0

| accepted

Answered
Running sfit (or fit) from command line
A good tip in cases like this is to use the "generate code" feature to see what the cftool GUI is doing. If you do that, you'll ...

14 years ago | 0

Answered
Regression/linear equation solving
Bring all the x's over to the left of the equal sign. Then a matrix representation of those equations is this: 1 ...

14 years ago | 1

| accepted

Answered
K-means clustering, is it possible to get vertical boundaries?
I believe the boundaries are horizontal because the scale of the y variable is much larger. Differences in the y direction domin...

14 years ago | 0

| accepted

Answered
Plot title being placed and then erased, and subplots different sizes
Take a look at this: title('main title'); set(gca,'Visible','off') set(get(gca,'Title'),'Visible','on') axes('Oute...

14 years ago | 0

| accepted

Answered
calculation of the distances between the features of the same cluster
Distances between pairs of points in cluster 1: squareform(pdist(X(IDX==1,:))) Use something similar to compute distance...

14 years ago | 0

Answered
Kolmogorov-Smirnov Limits on a CDF plot
Try running kstest with a sample of the appropriate size, just to get the fourth output argument. This is the critical value for...

14 years ago | 0

| accepted

Answered
Stepwisefit regression - additional outputs?
The fifth output from the function is a structure having a .intercept field that contains the intercept for the final model.

14 years ago | 0

Answered
How can i get a bell curve onto a histogram?
You'll need to do is to scale the histogram so that is has area 1.0, so it is comparable to a pdf that you superimpose on it. Se...

14 years ago | 0

Answered
fit a histogramm to a gaussian- or vice versa
One thing you'll need to do is to scale the histogram and bell curve so they have the same area. See my answer to this question:...

14 years ago | 0

| accepted

Answered
Making boxplot after removing the outliers
A point is declared an outlier based on a comparison of its value with quartiles of the data. If you take out an outlier, you al...

14 years ago | 3

| accepted

Answered
Logistic mixed-effect regression example
In that case nlmefit would not be suitable, because it fits models with a continuous response. The glmfit function would be suit...

14 years ago | 1

Answered
Histogram
There is a ksdensity function that can produce a kernel-smooth density estimate. The issue is that it produces a density (integr...

14 years ago | 2

| accepted

Load more