Difference between revisions of "Test variable C"

From Testiwiki
Jump to: navigation, search
(Formula)
m (Formula: road)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Brief guidance about the contents.''' This box of text can removed.
 
 
    <nowiki>{{variable}}</nowiki> template:
 
        Put your own username in moderator=Username unless someone else takes care of the page content.
 
        When the page is quite developed, change stub=No
 
    Question (previously Scope) Specifies a clear research question.
 
        This includes a question and a verbal definition of the spatial, temporal, and other limits
 
        (system boundaries) of the variable. The question is defined according to the use
 
        purpose of the assessment(s) that the variable belongs to.
 
    Answer (previously Result) Answer to the research question.
 
        Contains anything that a reader needs to understand the answer. If possible, a numerical expression or distribution.
 
        If there is more than a single answer, i.e. the answer is actually a list of answers, a [[data table]] should be used.
 
        Contains also the unit(s) in which the answer is expressed.
 
    Rationale (previously Definition) Description about how the answer is derived.
 
        Rationale contains anything that is needed to convince a critical rational reader.
 
        Description of the data used for obtaining the value of the variable
 
        (e.g. measurement data; mathematical method and its parameters).
 
        Please include references (preferably using the ''<nowiki><ref> </ref></nowiki>'' tags)
 
        and links to original data, as appropriate.
 
        May contain subheadings Dependencies and Formula.
 
        Subheadings no longer used: Data as most of Rationale is this anyway; Unit as it is already mentioned in Answer.
 
            Dependencies: Links to all variables whose answers affect the answer of this variable.
 
            Formula (or R code): computer code or mathematical formula for calculating the answer.
 
    See also: Links to relevant information that does not belong to ''Rationale''.
 
    Keywords: Any words that help users to find this page with search tools.
 
    References will appear automatically, if cited above using the ''<nowiki><ref> </ref></nowiki>'' tags.
 
        Additional references can also be listed here.
 
    ''Related files'' automatically shows files from [[Opasnet File]] if they have been linked to this page.
 
    <nowiki>{{publication}}</nowiki> can be used if the page is good enough to be a publication by itself. Otherwise, delete.
 
 
 
{{variable|moderator=Erkki Kuusisto|stub=Yes}}
 
{{variable|moderator=Erkki Kuusisto|stub=Yes}}
  
 
== Question ==
 
== Question ==
  
 +
For test purposes, a simple exposure-response function (ERF) that can be called from another variable?
  
 
== Answer ==
 
== Answer ==
  
 +
Use Miedema's ERF for the prevalence of high annoyance as a function of road noise exposure (Lden).
 +
 +
To use this function, include the R code named "ERF_Lden_HA" from this page as follows...
 +
 +
<nowiki><</nowiki>rcode
 +
include="page:Test_variable_C|name:ERF_Lden_HA"
 +
<nowiki>></nowiki>
 +
 +
...and using the input variable "Lden" call the function as follows:
 +
 +
PercentHighlyAnnoyedByRoadNoise <- ERF_Lden_HA(Lden)
  
 
== Rationale ==
 
== Rationale ==
 
  
  
Line 45: Line 26:
 
=== Formula ===
 
=== Formula ===
  
<rcode  
+
<rcode showcode="1"
name="testFunction"  
+
name="ERF_road_Lden_HA"  
 
>
 
>
  
AddFive <- function(x) {
+
ERF_road_Lden_HA <- function(Lden) {
CalculatedValue <- x + 5
+
PercentHighlyAnnoyedByRoadNoise <-
return(CalculatedValue)
+
9.868 * 10^-4  * (Lden - 42)^3 - 1.436 * 10^-2 * (Lden-42)^2 + 0.5118 * (Lden - 42)
 +
 
 +
return(PercentHighlyAnnoyedByRoadNoise)
 
}
 
}
  
  
AddFive(30)
+
# debug ERF_road_Lden_HA(60)
 
 
  
 
</rcode>
 
</rcode>

Latest revision as of 12:45, 21 May 2012


Question

For test purposes, a simple exposure-response function (ERF) that can be called from another variable?

Answer

Use Miedema's ERF for the prevalence of high annoyance as a function of road noise exposure (Lden).

To use this function, include the R code named "ERF_Lden_HA" from this page as follows...

<rcode include="page:Test_variable_C|name:ERF_Lden_HA" >

...and using the input variable "Lden" call the function as follows:

PercentHighlyAnnoyedByRoadNoise <- ERF_Lden_HA(Lden)

Rationale

Dependencies

Formula

- Hide code


ERF_road_Lden_HA <- function(Lden) {
	PercentHighlyAnnoyedByRoadNoise <-
	9.868 * 10^-4  * (Lden - 42)^3 - 1.436 * 10^-2 * (Lden-42)^2 + 0.5118 * (Lden - 42)

	return(PercentHighlyAnnoyedByRoadNoise)
}


# debug ERF_road_Lden_HA(60)

See also

Keywords

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>

Test variable C. Opasnet . [1]. Accessed 18 May 2024.