derivNRoptCpp | R Documentation |
This function calculates the optimum rate for every location in the field to identify the site-specific optimum rate.
derivNRoptCpp(NRdf, NRoptDat, Nrates, rr, cc, CEXP)
NRdf |
A matrix with rows for each location in the field and columns for the experimental rate applied. Values are the calculated net-returns. |
NRoptDat |
A matrix with columns for the optimum experimental rate and the associated net-return for each location in the field. This is filled in below. |
Nrates |
A matrix with one column with each experimental rate in the range specified by the user. |
rr |
Integer of the number of observations (rows of NRdf). |
cc |
Integer of the number of experimental rates (rows of Nrates = columns of NRdf). |
CEXP |
Double, the cost of the experimental input. |
This differs from selecting the rate that yields the highest net- return (selecting 'max' for the optimization method) is highlighted in the following example. The net-return at a point for a rate of X was 120 and the net-return at the point for a rate of X+1 was 121 and the cost of one unit of the experimental input was $3. The optimum rate identified in this function would be X, whereas when 'max' is selected X+1 would be the optimum rate because the net-return was higher despite earning less than the cost of the added input.
NRoptDat.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.