Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #8287 > unrolled thread
| Started by | Darren Glosemeyer <darreng@wolfram.com> |
|---|---|
| First post | 2012-02-01 08:56 +0000 |
| Last post | 2012-02-01 08:56 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Fit data Darren Glosemeyer <darreng@wolfram.com> - 2012-02-01 08:56 +0000
| From | Darren Glosemeyer <darreng@wolfram.com> |
|---|---|
| Date | 2012-02-01 08:56 +0000 |
| Subject | Re: Fit data |
| Message-ID | <jgaunt$ev8$1@smc.vnet.net> |
On 1/30/2012 4:09 AM, Miguel Camino wrote:
> Hi, I'm new in this forum and with Mathematica..I've got 2 questions;Is too much?
> 1. I've to regress some data with a formula that I've implemented.This is an Example of my data and this is my formula:sigma=a*pc^(0.618)*tc*(1+omega)^c*(1-tr)^dtr, omega, tc, pc sigma0.703784817, 0.310237474, 361.0989249, 34.97280104, 12.410.710106871, 0.310283818, 361.1126025, 34.94104003, 12.140.715649046, 0.310330225, 361.1262985, 34.90923611, 11.770.720912444, 0.310376694, 361.1400131, 34.87738919, 11.520.726476477, 0.31043254, 361.1564951, 34.83911601, 11.30.731293672, 0.310479148, 361.1702505, 34.80717419, 11I used this formulafit = NonlinearModelFit[data, a*pc^(0.618)*tc^b*(1 + omega)^c*(1 - Tr)^d, {a, b, c, d}, {Tr, omega, tc, pc}]and I try to calculate best {a,b,c,d}.
> 2. I don't know if 0.618 is the best value. Is thes a way to find the best number that Fit my data?Thanks and sorry for two questions!M.
>
>
For question 1, your data will need to be a numeric matrix with 5
columns. The first 4 columns will be the values of tr, omega, tc, and
pc, and the last will be the sigma values. Note that Tr is a built-in
Mathematica function, so I would recommend using tr or something else
that doesn't start with a capital letter. You may also need to give
starting values for the parameters a, b, c, and d to get a good fit;
this is just the nature of nonlinear optimization.
For question2, you could replace 0.618 in the formula by some symbol
(say p) and add that symbol to the list of parameters to estimate. If
.618 seems like a reasonable value for your data, you could use that as
a starting value for p.
Darren Glosemeyer
Wolfram Research
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web