

Hi
I need a Latin Hypercube with the following conditions:
0 < x[,"a"] < 1
0 < x[,"b"] < 1
0 < x[,"c"] < 1
but also
x[,"a"] + x[,"b"] < h
The first three are easy:
8<cut herestart>8
n < 1000
lhc < lhs::randomLHS(n=n, k=3
colnames(lhc) < c("a", "b", "c")
x < lhc
8<cut hereend>8
Now the last condition:
I tried
8<cut herestart>8
h < 28
x[,"a"] < x[,"a"] / 2
x[,"b"] < x[,"b"] / 2
8<cut hereend>8
But this obviously reduces the individual ranges.
Using the rowSum as in
https://stat.ethz.ch/pipermail/rhelp/2013October/361263.htmlmakes the sum of the variables also to 2.
So how can I create a Latin Hypercube which fulfills the conditions?
Rainer

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33  (0)9 53 10 27 44
Cell: +33  (0)6 85 62 59 98
Fax : +33  (0)9 58 10 27 44
Fax (D): +49  (0)3 21 21 25 22 44
email: [hidden email]
Skype: RMkrug
PGP: 0x0F52F982
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


I don't think the problem is well defined. Otherwise you could just pick very small numbers from a range that is guaranteed to keep the sum < h.
B.
On Oct 15, 2015, at 8:48 AM, Rainer M Krug < [hidden email]> wrote:
> Hi
>
> I need a Latin Hypercube with the following conditions:
>
> 0 < x[,"a"] < 1
> 0 < x[,"b"] < 1
> 0 < x[,"c"] < 1
>
> but also
>
> x[,"a"] + x[,"b"] < h
>
> The first three are easy:
>
> 8<cut herestart>8
> n < 1000
>
> lhc < lhs::randomLHS(n=n, k=3
> colnames(lhc) < c("a", "b", "c")
>
> x < lhc
> 8<cut hereend>8
>
> Now the last condition:
>
> I tried
>
> 8<cut herestart>8
> h < 28
> x[,"a"] < x[,"a"] / 2
> x[,"b"] < x[,"b"] / 2
> 8<cut hereend>8
>
> But this obviously reduces the individual ranges.
>
> Using the rowSum as in
> https://stat.ethz.ch/pipermail/rhelp/2013October/361263.html>
> makes the sum of the variables also to 2.
>
> So how can I create a Latin Hypercube which fulfills the conditions?
>
> Rainer
>
> 
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel : +33  (0)9 53 10 27 44
> Cell: +33  (0)6 85 62 59 98
> Fax : +33  (0)9 58 10 27 44
>
> Fax (D): +49  (0)3 21 21 25 22 44
>
> email: [hidden email]
>
> Skype: RMkrug
>
> PGP: 0x0F52F982
> ______________________________________________
> [hidden email] mailing list  To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/rhelp> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html> and provide commented, minimal, selfcontained, reproducible code.
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Boris Steipe < [hidden email]> writes:
> I don't think the problem is well defined. Otherwise you could just
> pick very small numbers from a range that is guaranteed to keep the
> sum < h.
What further information is missing? That the variables should be
covering the whole range from 0 to 1?
OK  forgotten to state that h < 1.
This is for a sensitivity analysis which I want to conduct on a complex
function.
Rainer
>
>
> B.
>
> On Oct 15, 2015, at 8:48 AM, Rainer M Krug < [hidden email]> wrote:
>
>> Hi
>>
>> I need a Latin Hypercube with the following conditions:
>>
>> 0 < x[,"a"] < 1
>> 0 < x[,"b"] < 1
>> 0 < x[,"c"] < 1
>>
>> but also
>>
>> x[,"a"] + x[,"b"] < h
>>
>> The first three are easy:
>>
>> 8<cut herestart>8
>> n < 1000
>>
>> lhc < lhs::randomLHS(n=n, k=3
>> colnames(lhc) < c("a", "b", "c")
>>
>> x < lhc
>> 8<cut hereend>8
>>
>> Now the last condition:
>>
>> I tried
>>
>> 8<cut herestart>8
>> h < 28
>> x[,"a"] < x[,"a"] / 2
>> x[,"b"] < x[,"b"] / 2
>> 8<cut hereend>8
>>
>> But this obviously reduces the individual ranges.
>>
>> Using the rowSum as in
>> https://stat.ethz.ch/pipermail/rhelp/2013October/361263.html>>
>> makes the sum of the variables also to 2.
>>
>> So how can I create a Latin Hypercube which fulfills the conditions?
>>
>> Rainer
>>
>> 
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>>
>> Tel : +33  (0)9 53 10 27 44
>> Cell: +33  (0)6 85 62 59 98
>> Fax : +33  (0)9 58 10 27 44
>>
>> Fax (D): +49  (0)3 21 21 25 22 44
>>
>> email: [hidden email]
>>
>> Skype: RMkrug
>>
>> PGP: 0x0F52F982
>> ______________________________________________
>> [hidden email] mailing list  To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/rhelp>> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html>> and provide commented, minimal, selfcontained, reproducible code.
>

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33  (0)9 53 10 27 44
Cell: +33  (0)6 85 62 59 98
Fax : +33  (0)9 58 10 27 44
Fax (D): +49  (0)3 21 21 25 22 44
email: [hidden email]
Skype: RMkrug
PGP: 0x0F52F982
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


If you need h equal to 1, then replace any nonzero initial value of x[,b] with 1x[,a].
But if you really need "less than", you'll need to specify what your desired distribution of h  x[,"a"] + x[,"b"] should look like.
No?
B.
On Oct 15, 2015, at 9:27 AM, Rainer M Krug < [hidden email]> wrote:
> Boris Steipe < [hidden email]> writes:
>
>> I don't think the problem is well defined. Otherwise you could just
>> pick very small numbers from a range that is guaranteed to keep the
>> sum < h.
>
> What further information is missing? That the variables should be
> covering the whole range from 0 to 1?
>
> OK  forgotten to state that h < 1.
>
> This is for a sensitivity analysis which I want to conduct on a complex
> function.
>
> Rainer
>
>
>>
>>
>> B.
>>
>> On Oct 15, 2015, at 8:48 AM, Rainer M Krug < [hidden email]> wrote:
>>
>>> Hi
>>>
>>> I need a Latin Hypercube with the following conditions:
>>>
>>> 0 < x[,"a"] < 1
>>> 0 < x[,"b"] < 1
>>> 0 < x[,"c"] < 1
>>>
>>> but also
>>>
>>> x[,"a"] + x[,"b"] < h
>>>
>>> The first three are easy:
>>>
>>> 8<cut herestart>8
>>> n < 1000
>>>
>>> lhc < lhs::randomLHS(n=n, k=3
>>> colnames(lhc) < c("a", "b", "c")
>>>
>>> x < lhc
>>> 8<cut hereend>8
>>>
>>> Now the last condition:
>>>
>>> I tried
>>>
>>> 8<cut herestart>8
>>> h < 28
>>> x[,"a"] < x[,"a"] / 2
>>> x[,"b"] < x[,"b"] / 2
>>> 8<cut hereend>8
>>>
>>> But this obviously reduces the individual ranges.
>>>
>>> Using the rowSum as in
>>> https://stat.ethz.ch/pipermail/rhelp/2013October/361263.html>>>
>>> makes the sum of the variables also to 2.
>>>
>>> So how can I create a Latin Hypercube which fulfills the conditions?
>>>
>>> Rainer
>>>
>>> 
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Centre of Excellence for Invasion Biology
>>> Stellenbosch University
>>> South Africa
>>>
>>> Tel : +33  (0)9 53 10 27 44
>>> Cell: +33  (0)6 85 62 59 98
>>> Fax : +33  (0)9 58 10 27 44
>>>
>>> Fax (D): +49  (0)3 21 21 25 22 44
>>>
>>> email: [hidden email]
>>>
>>> Skype: RMkrug
>>>
>>> PGP: 0x0F52F982
>>> ______________________________________________
>>> [hidden email] mailing list  To UNSUBSCRIBE and more, see
>>> https://stat.ethz.ch/mailman/listinfo/rhelp>>> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html>>> and provide commented, minimal, selfcontained, reproducible code.
>>
>
> 
> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>
> Centre of Excellence for Invasion Biology
> Stellenbosch University
> South Africa
>
> Tel : +33  (0)9 53 10 27 44
> Cell: +33  (0)6 85 62 59 98
> Fax : +33  (0)9 58 10 27 44
>
> Fax (D): +49  (0)3 21 21 25 22 44
>
> email: [hidden email]
>
> Skype: RMkrug
>
> PGP: 0x0F52F982
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Sorry  two typos coorected:
If you need x[,"a"] + x[,"b"] equal to 1, then replace any nonzero initial value of x[,b] with 1x[,a].
But if you really need "less than" h, you'll need to specify what your desired distribution of h  (x[,"a"] + x[,"b"]) should look like.
On Oct 15, 2015, at 9:52 AM, Boris Steipe < [hidden email]> wrote:
> If you need h equal to 1, then replace any nonzero initial value of x[,b] with 1x[,a].
> But if you really need "less than", you'll need to specify what your desired distribution of h  x[,"a"] + x[,"b"] should look like.
>
> No?
>
>
> B.
>
>
>
> On Oct 15, 2015, at 9:27 AM, Rainer M Krug < [hidden email]> wrote:
>
>> Boris Steipe < [hidden email]> writes:
>>
>>> I don't think the problem is well defined. Otherwise you could just
>>> pick very small numbers from a range that is guaranteed to keep the
>>> sum < h.
>>
>> What further information is missing? That the variables should be
>> covering the whole range from 0 to 1?
>>
>> OK  forgotten to state that h < 1.
>>
>> This is for a sensitivity analysis which I want to conduct on a complex
>> function.
>>
>> Rainer
>>
>>
>>>
>>>
>>> B.
>>>
>>> On Oct 15, 2015, at 8:48 AM, Rainer M Krug < [hidden email]> wrote:
>>>
>>>> Hi
>>>>
>>>> I need a Latin Hypercube with the following conditions:
>>>>
>>>> 0 < x[,"a"] < 1
>>>> 0 < x[,"b"] < 1
>>>> 0 < x[,"c"] < 1
>>>>
>>>> but also
>>>>
>>>> x[,"a"] + x[,"b"] < h
>>>>
>>>> The first three are easy:
>>>>
>>>> 8<cut herestart>8
>>>> n < 1000
>>>>
>>>> lhc < lhs::randomLHS(n=n, k=3
>>>> colnames(lhc) < c("a", "b", "c")
>>>>
>>>> x < lhc
>>>> 8<cut hereend>8
>>>>
>>>> Now the last condition:
>>>>
>>>> I tried
>>>>
>>>> 8<cut herestart>8
>>>> h < 28
>>>> x[,"a"] < x[,"a"] / 2
>>>> x[,"b"] < x[,"b"] / 2
>>>> 8<cut hereend>8
>>>>
>>>> But this obviously reduces the individual ranges.
>>>>
>>>> Using the rowSum as in
>>>> https://stat.ethz.ch/pipermail/rhelp/2013October/361263.html>>>>
>>>> makes the sum of the variables also to 2.
>>>>
>>>> So how can I create a Latin Hypercube which fulfills the conditions?
>>>>
>>>> Rainer
>>>>
>>>> 
>>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>>
>>>> Centre of Excellence for Invasion Biology
>>>> Stellenbosch University
>>>> South Africa
>>>>
>>>> Tel : +33  (0)9 53 10 27 44
>>>> Cell: +33  (0)6 85 62 59 98
>>>> Fax : +33  (0)9 58 10 27 44
>>>>
>>>> Fax (D): +49  (0)3 21 21 25 22 44
>>>>
>>>> email: [hidden email]
>>>>
>>>> Skype: RMkrug
>>>>
>>>> PGP: 0x0F52F982
>>>> ______________________________________________
>>>> [hidden email] mailing list  To UNSUBSCRIBE and more, see
>>>> https://stat.ethz.ch/mailman/listinfo/rhelp>>>> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html>>>> and provide commented, minimal, selfcontained, reproducible code.
>>>
>>
>> 
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Stellenbosch University
>> South Africa
>>
>> Tel : +33  (0)9 53 10 27 44
>> Cell: +33  (0)6 85 62 59 98
>> Fax : +33  (0)9 58 10 27 44
>>
>> Fax (D): +49  (0)3 21 21 25 22 44
>>
>> email: [hidden email]
>>
>> Skype: RMkrug
>>
>> PGP: 0x0F52F982
>
> ______________________________________________
> [hidden email] mailing list  To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/rhelp> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html> and provide commented, minimal, selfcontained, reproducible code.
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.


Boris Steipe < [hidden email]> writes:
> Sorry  two typos coorected:
>
> If you need x[,"a"] + x[,"b"] equal to 1, then replace any nonzero initial value of x[,b] with 1x[,a].
> But if you really need "less than" h, you'll need to specify what your
> desired distribution of h  (x[,"a"] + x[,"b"]) should look like.
I think I get your point. I am thinking of adding an additional variable
to the x Latin Hypercube which I will than use as x[,"a] + x[,"b"] and I
will use that one as the distribution.
I think that will work.
Thanks,
Rainer
>
>
> On Oct 15, 2015, at 9:52 AM, Boris Steipe < [hidden email]> wrote:
>
>> If you need h equal to 1, then replace any nonzero initial value of x[,b] with 1x[,a].
>> But if you really need "less than", you'll need to specify what your
>> desired distribution of h  x[,"a"] + x[,"b"] should look like.
>>
>> No?
>>
>>
>> B.
>>
>>
>>
>> On Oct 15, 2015, at 9:27 AM, Rainer M Krug < [hidden email]> wrote:
>>
>>> Boris Steipe < [hidden email]> writes:
>>>
>>>> I don't think the problem is well defined. Otherwise you could just
>>>> pick very small numbers from a range that is guaranteed to keep the
>>>> sum < h.
>>>
>>> What further information is missing? That the variables should be
>>> covering the whole range from 0 to 1?
>>>
>>> OK  forgotten to state that h < 1.
>>>
>>> This is for a sensitivity analysis which I want to conduct on a complex
>>> function.
>>>
>>> Rainer
>>>
>>>
>>>>
>>>>
>>>> B.
>>>>
>>>> On Oct 15, 2015, at 8:48 AM, Rainer M Krug < [hidden email]> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I need a Latin Hypercube with the following conditions:
>>>>>
>>>>> 0 < x[,"a"] < 1
>>>>> 0 < x[,"b"] < 1
>>>>> 0 < x[,"c"] < 1
>>>>>
>>>>> but also
>>>>>
>>>>> x[,"a"] + x[,"b"] < h
>>>>>
>>>>> The first three are easy:
>>>>>
>>>>> 8<cut herestart>8
>>>>> n < 1000
>>>>>
>>>>> lhc < lhs::randomLHS(n=n, k=3
>>>>> colnames(lhc) < c("a", "b", "c")
>>>>>
>>>>> x < lhc
>>>>> 8<cut hereend>8
>>>>>
>>>>> Now the last condition:
>>>>>
>>>>> I tried
>>>>>
>>>>> 8<cut herestart>8
>>>>> h < 28
>>>>> x[,"a"] < x[,"a"] / 2
>>>>> x[,"b"] < x[,"b"] / 2
>>>>> 8<cut hereend>8
>>>>>
>>>>> But this obviously reduces the individual ranges.
>>>>>
>>>>> Using the rowSum as in
>>>>> https://stat.ethz.ch/pipermail/rhelp/2013October/361263.html>>>>>
>>>>> makes the sum of the variables also to 2.
>>>>>
>>>>> So how can I create a Latin Hypercube which fulfills the conditions?
>>>>>
>>>>> Rainer
>>>>>
>>>>> 
>>>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>>>
>>>>> Centre of Excellence for Invasion Biology
>>>>> Stellenbosch University
>>>>> South Africa
>>>>>
>>>>> Tel : +33  (0)9 53 10 27 44
>>>>> Cell: +33  (0)6 85 62 59 98
>>>>> Fax : +33  (0)9 58 10 27 44
>>>>>
>>>>> Fax (D): +49  (0)3 21 21 25 22 44
>>>>>
>>>>> email: [hidden email]
>>>>>
>>>>> Skype: RMkrug
>>>>>
>>>>> PGP: 0x0F52F982
>>>>> ______________________________________________
>>>>> [hidden email] mailing list  To UNSUBSCRIBE and more, see
>>>>> https://stat.ethz.ch/mailman/listinfo/rhelp>>>>> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html>>>>> and provide commented, minimal, selfcontained, reproducible code.
>>>>
>>>
>>> 
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
>>>
>>> Centre of Excellence for Invasion Biology
>>> Stellenbosch University
>>> South Africa
>>>
>>> Tel : +33  (0)9 53 10 27 44
>>> Cell: +33  (0)6 85 62 59 98
>>> Fax : +33  (0)9 58 10 27 44
>>>
>>> Fax (D): +49  (0)3 21 21 25 22 44
>>>
>>> email: [hidden email]
>>>
>>> Skype: RMkrug
>>>
>>> PGP: 0x0F52F982
>>
>> ______________________________________________
>> [hidden email] mailing list  To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/rhelp>> PLEASE do read the posting guide http://www.Rproject.org/postingguide.html>> and provide commented, minimal, selfcontained, reproducible code.
>

Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33  (0)9 53 10 27 44
Cell: +33  (0)6 85 62 59 98
Fax : +33  (0)9 58 10 27 44
Fax (D): +49  (0)3 21 21 25 22 44
email: [hidden email]
Skype: RMkrug
PGP: 0x0F52F982
______________________________________________
[hidden email] mailing list  To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/rhelpPLEASE do read the posting guide http://www.Rproject.org/postingguide.htmland provide commented, minimal, selfcontained, reproducible code.

