bbolker wrote:
> 
> <bialozyt <at> biologie.uni-marburg.de> writes:
> 
>> you answerd to Nancy Shackelford about Clarks 2Dt function.
>> Since the thread ended just after your reply,
>> I would like to ask, if you have an idea how to use this function in R
> 
> I got started on your problem, but I didn't finish it.
> I got a plausible answer to start with, but when checking
> the answer I ran into some trouble.  Unfortunately, fitting
> these functions is a bit harder than one might expect ...
> it takes quite a bit of fussing to get a good, reliable answer.
> 
>   My partly-worked solution is below.
> 
> ## fixed
> clark2Dt <- function(x , p, u=1) {
>    (p/(pi*u))/(1+(x^2/u))^(p+1)
>  }
> 
> it might be easier to read this way (but is basically the same):
> 
> clark2Dt <- function(x , p, u=1) {
>     p/(pi*u*(1+(x^2/u))^(p+1)))
> }
> 
> It might be preferable to define this in terms of s=sqrt(u)
> instead (then s would be a scale parameter with the same units
> as x, more easily interpretable ...
> 
> Maybe, we discuss about that later on.
> 
> ## assume these are traps/samples with unit size
> ## (if not, it will get absorbed into the "fecundity" constant
> sorry, the data I presented had been values from an histogram.
> The original values are distances of a seed to the mother tree (collected
> at the ground and analysed by genetic methods)
> distance.g <- c(9.47232811914168, 11.5630878232601, 17.3827098005335,
> 17.5600939627878, 
> 18.654398944747, 19.275178339348, 21.8818486421527, 24.7435850272904, 
> 24.7435850272904, 26.7718434185444, 27.0590058941556, 29.6521854169334, 
> 31.1320799176942, 35.3820703187569, 35.3820703187569, 37.8337534486551, 
> 39.1764342432586, 42.2206217394529, 42.2206217394529, 46.6070488232746, 
> 47.0958352718993, 47.879233494707, 48.2387406553514, 50.8665115768823, 
> 52.6980549929627, 61.1531879793733, 64.2214247742698, 77.1263333762711, 
> 77.202254500777, 77.3194477483065, 79.4948180709245, 79.5726567345014, 
> 79.5726567345014, 88.0804024742081, 89.2390553520044, 91.2574654483515, 
> 114.565764954916, 114.565764954916, 116.17115175455, 117.152046504188, 
> 117.268056179105, 117.453800704495, 119.837877150803, 120.140648408006, 
> 121.44946356442, 122.510601174015, 126.837244136672, 126.837244136672, 
> 127.566961633094, 129.663329048668, 133.908240597828, 136.759605878483, 
> 139.003489164914, 139.50556763001, 139.50556763001, 139.50556763001, 
> 146.974468871303, 147.755130536613, 147.755130536613, 162.676537028077, 
> 162.866514667679, 166.683866645741, 167.76249998129, 169.292965300547, 
> 181.234937305426, 184.245751646494, 184.245751646494, 184.274614639389, 
> 186.352049626362, 186.515863399008, 187.015197509915, 189.430673862562, 
> 192.365315220583, 192.365315220583, 193.952885258349, 197.375515451871, 
> 198.543778799249, 200.520691201501, 205.542393680856, 225.561660084303, 
> 231.752325770962, 233.023285532692, 233.023285532692, 233.023285532692, 
> 233.759118752746, 235.325997289608, 239.854566353462, 240.991578690945, 
> 242.360865240119, 245.316493737478, 250.607074322132, 255.339762865456, 
> 255.339762865456, 255.373878851326, 259.681179333143, 262.909634855639, 
> 274.461480903967, 274.461480903967, 275.408697211377, 278.603449547446, 
> 279.386382094669, 283.251948979172, 283.251948979172, 285.64952739357, 
> 285.948766389864, 287.336178892847, 293.919249114593, 296.684681943866, 
> 318.22059219857, 321.528407765743, 321.528407765743, 328.199413922994, 
> 329.256885273328, 336.700014849395, 340.813815007235, 344.155248252501, 
> 355.036094643507, 369.731635108215, 413.34522726085, 437.163468053688, 
> 486.081993289409, 511.989800874079, 513.42775947575)
> 
> So, I thought I could just use these values instead of the other ones.
> 
> but non of my settings worked:
> 
> Would it help to use these data?
> 
> Thanks
> Ronald
> 

--
View this message in context: 
http://r.789695.n4.nabble.com/Clarks-2Dt-function-in-R-tp3425158p3602490.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to