Training costs: Difference between revisions
Jump to navigation
Jump to search
(first draft) |
(→Data) |
||
| (11 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{variable|moderator=Jouni}} | {{variable|moderator=Jouni}} | ||
[[Category:Code under inspection]] | |||
'''Training costs''' are an example of a cost variable in an assessment. | '''Training costs''' are an example of a cost variable in an assessment. | ||
| Line 8: | Line 9: | ||
==Answer== | ==Answer== | ||
<t2b index="Payer, | <rcode graphics=1> | ||
Factory|Cleaning | |||
Factory|Cleaning | library(OpasnetUtils) | ||
library(ggplot2) | |||
objects.latest("Op_en5871", code_name = "initiate") # [[Training assessment]] costs | |||
costs <- EvalOutput(costs) | |||
ggplot(costs@output, aes(x = Year, weight = costsResult, fill = Expenditure)) + | |||
geom_bar(position = "dodge") + | |||
theme_grey(base_size = 24) | |||
</rcode> | |||
==Rationale== | |||
=== Data === | |||
<t2b index="Payer,Expenditure,Year" obs="Result" desc="Description" unit="€"> | |||
Factory|Cleaning equipment use|2012|20000-22000| | |||
Factory|Cleaning equipment use|2020|22000-24000| | |||
Society|Health promotion campaign|2012|10000| | |||
Society|Health promotion campaign|2020|10000| | |||
</t2b> | </t2b> | ||
== | === Calculations === | ||
<rcode label="Initiate variable" name="initiate" embed=1> | |||
library(OpasnetUtils) | |||
costs <- Ovariable("costs", | |||
dependencies = data.frame( | |||
Name = c("health_impact", "unitcost"), | |||
Ident = c("Op_en5675/initiate", NA) | |||
), | |||
formula = function(...) { | |||
fixedcosts <- Ovariable("fixedcosts", ddata = "Op_en5871") # [[Training costs]] | |||
socialcosts <- unitcost * health_impact * Ovariable(output = data.frame( | |||
Payer = c("Society", "Factory"), | |||
Result = c(1, 0) | |||
), marginal = c(TRUE, FALSE)) | |||
totcosts <- fixedcosts + socialcosts | |||
return(totcosts) | |||
} | |||
) | |||
objects.store(costs) | |||
cat("Ovariable costs saved.\n") | |||
</rcode> | |||
==See also== | ==See also== | ||
| Line 27: | Line 76: | ||
==Related files== | ==Related files== | ||
Latest revision as of 19:18, 24 March 2015
| Moderator:Jouni (see all) |
|
|
| Upload data
|
Training costs are an example of a cost variable in an assessment.
Question
What are the costs in the training assessment?
Answer
Rationale
Data
| Obs | Payer | Expenditure | Year | Result | Description |
|---|---|---|---|---|---|
| 1 | Factory | Cleaning equipment use | 2012 | 20000-22000 | |
| 2 | Factory | Cleaning equipment use | 2020 | 22000-24000 | |
| 3 | Society | Health promotion campaign | 2012 | 10000 | |
| 4 | Society | Health promotion campaign | 2020 | 10000 |
Calculations
See also
| Help pages | Wiki editing • How to edit wikipages • Quick reference for wiki editing • Drawing graphs • Opasnet policies • Watching pages • Writing formulae • Word to Wiki • Wiki editing Advanced skills |
| Training assessment (examples of different objects) | Training assessment • Training exposure • Training health impact • Training costs • Climate change policies and health in Kuopio • Climate change policies in Kuopio |
| Methods and concepts | Assessment • Variable • Method • Question • Answer • Rationale • Attribute • Decision • Result • Object-oriented programming in Opasnet • Universal object • Study • Formula • OpasnetBaseUtils • Open assessment • PSSP |
| Terms with changed use | Scope • Definition • Result • Tool |
References