On 2/22/2016 10:42 AM, someone wrote:
> "Alessandro De Sanctis" wrote in message
> <naf92r$if5$1@newscl01ah.mathworks.com>...
>> Hello,
>>
>> I have to maximize a likelihood in which to every observation
>> correspond a specific (non-integer) weight. In particular, I am
>> referring to sampling weights, which denote the inverse of the
>> probability that the observation is included in the sample.
>>
>> I tried by expanding the dataset (so that an observation with weight =
>> 100 is repeated 100 times) but the dataset became extremely large and
>> it's the second week that fminsearch is running.
>>
>> My ultimate goal would be to estimate a non-linear model with a binary
>> dependent variable and weights to observations.
>>
>> Please any alternative idea on how to proceed is welcome. Thank you in
>> advance.
>> Alessandro
>
> To help us help you, can you show us a small snippet of your code? The
> above description is pretty vague and doesn't give us much to go on.
In particular, what is the mathematical form of your objective function,
meaning the function you are trying to minimize? There is probably a
shortcut that you can take in your function definition to account for
weights, rather than adding new rows to the dataset.
Also, fminsearch is not the fastest or most robust optimizer in
Optimization Toolbox. You might do better to try fminunc, or another
appropriate solver.
Alan Weiss
MATLAB mathematical toolbox documentation
> "Alessandro De Sanctis" wrote in message
> <naf92r$if5$1@newscl01ah.mathworks.com>...
>> Hello,
>>
>> I have to maximize a likelihood in which to every observation
>> correspond a specific (non-integer) weight. In particular, I am
>> referring to sampling weights, which denote the inverse of the
>> probability that the observation is included in the sample.
>>
>> I tried by expanding the dataset (so that an observation with weight =
>> 100 is repeated 100 times) but the dataset became extremely large and
>> it's the second week that fminsearch is running.
>>
>> My ultimate goal would be to estimate a non-linear model with a binary
>> dependent variable and weights to observations.
>>
>> Please any alternative idea on how to proceed is welcome. Thank you in
>> advance.
>> Alessandro
>
> To help us help you, can you show us a small snippet of your code? The
> above description is pretty vague and doesn't give us much to go on.
In particular, what is the mathematical form of your objective function,
meaning the function you are trying to minimize? There is probably a
shortcut that you can take in your function definition to account for
weights, rather than adding new rows to the dataset.
Also, fminsearch is not the fastest or most robust optimizer in
Optimization Toolbox. You might do better to try fminunc, or another
appropriate solver.
Alan Weiss
MATLAB mathematical toolbox documentation