Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vnijs committed Jun 24, 2016
1 parent bb9beee commit 48909f8
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 22 deletions.
7 changes: 1 addition & 6 deletions MakeFile.R
Expand Up @@ -18,24 +18,19 @@ setwd("~/gh/docs/")
knit("README.Rmd")
setwd("~/gh/docs/sub")
knit("README_dev.Rmd")
# file.copy("README_dev.md","../../radiant/README.md",overwrite = TRUE)
# file.copy("README_dev.md","../../radiant.data/inst/app/tools/app/about.md",overwrite = TRUE)
knit("tutorials_dev.Rmd")
# file.copy("tutorials_dev.md","../../radiant.data/inst/app/tools/app/tutorials.md",overwrite = TRUE)s

file.copy("README_dev.md",file.path("../../radiant.data/inst/app/tools/app/about.md"),overwrite = TRUE)
file.copy("tutorials_dev.md",file.path("../../radiant.data/inst/app/tools/app/tutorials.md"),overwrite = TRUE)

copy_docs <- function(app) file.copy("README_dev.md",file.path("../..",app,"README.md"),overwrite = TRUE)
sapply(c("radiant","radiant.data","radiant.design","radiant.basics","radiant.model","radiant.multivariate"), copy_docs)


## sync (R)md files to gh/radiant
setwd("~/gh/docs")
system('sh rsync_docs2app.sh')

## create documentation pdf
## make function for sapply
## create documentation pdfs
unlink('radiant.data.pdf')
setwd("~")
unlink('radiant.data.pdf')
Expand Down
1 change: 0 additions & 1 deletion data/app/figures

This file was deleted.

2 changes: 1 addition & 1 deletion design/sample_size.Rmd
Expand Up @@ -3,5 +3,5 @@ title: "Design > Sample > Sample size (single)"
---
***

```{r child='app/sample_size.Rmd'}
```{r child='app/sample_size.md'}
```
2 changes: 1 addition & 1 deletion design/sample_size_comp.Rmd
Expand Up @@ -3,5 +3,5 @@ title: "Design > Sample > Sample size (compare)"
---
***

```{r child='app/sample_size_comp.Rmd'}
```{r child='app/sample_size_comp.md'}
```
2 changes: 1 addition & 1 deletion model/app/dtree.Rmd
Expand Up @@ -47,7 +47,7 @@ $$

The EMV from signing with the movie company is however $960,000 - 5,000 = 955,000$. Hover the cursor over the chance node shown on screen to see a `tooltip` that shows the calculation. To highlight that a `cost` was specified the chance node in the figure has a dashed outer line.

In the `Sign contract` example it is clear that `Sign with Movie Company` is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the _Sensitivity_ tab is useful. Here we can evaluate how decisions (e.g., `Sign with Movie Company` and `Sign with TV Network`) would chance if the legal fee changes. Enter 0 as the `Min` value, 80000 as the `Max value, 10000 as the `Step` size, and then press the <i class="fa fa-plus"></i> icon. After pressing `Evaluate sensitivty` a graph will be show that illustrate how payoffs for the decision change. Notice that if the legal fee was higher than \$60,000, `Sign with TV Network` would produce the highest EMV.
In the `Sign contract` example it is clear that `Sign with Movie Company` is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the _Sensitivity_ tab is useful. Here we can evaluate how decisions (e.g., `Sign with Movie Company` and `Sign with TV Network`) would change if the legal fee changes. Enter 0 as the `Min` value, 80000 as the `Max value`, 10000 as the `Step` size, and then press the <i class="fa fa-plus"></i> icon. After pressing `Evaluate sensitivty` a graph will be shown that illustrates how payoffs for the decisions change. Notice that for legal fees higher than \$60,000 `Sign with TV Network` produces the highest EMV.

<p align="center"><img src="figures_model/dtree_sensitivity.png"></p>

Expand Down
2 changes: 1 addition & 1 deletion model/app/dtree.md
Expand Up @@ -47,7 +47,7 @@ $$

The EMV from signing with the movie company is however $960,000 - 5,000 = 955,000$. Hover the cursor over the chance node shown on screen to see a `tooltip` that shows the calculation. To highlight that a `cost` was specified the chance node in the figure has a dashed outer line.

In the `Sign contract` example it is clear that `Sign with Movie Company` is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the _Sensitivity_ tab is useful. Here we can evaluate how decisions (e.g., `Sign with Movie Company` and `Sign with TV Network`) would chance if the legal fee changes. Enter 0 as the `Min` value, 80000 as the `Max value, 10000 as the `Step` size, and then press the <i class="fa fa-plus"></i> icon. After pressing `Evaluate sensitivty` a graph will be show that illustrate how payoffs for the decision change. Notice that if the legal fee was higher than \$60,000, `Sign with TV Network` would produce the highest EMV.
In the `Sign contract` example it is clear that `Sign with Movie Company` is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the _Sensitivity_ tab is useful. Here we can evaluate how decisions (e.g., `Sign with Movie Company` and `Sign with TV Network`) would change if the legal fee changes. Enter 0 as the `Min` value, 80000 as the `Max value`, 10000 as the `Step` size, and then press the <i class="fa fa-plus"></i> icon. After pressing `Evaluate sensitivty` a graph will be shown that illustrates how payoffs for the decisions change. Notice that for legal fees higher than \$60,000 `Sign with TV Network` produces the highest EMV.

<p align="center"><img src="figures_model/dtree_sensitivity.png"></p>

Expand Down
2 changes: 1 addition & 1 deletion model/dtree.html
Expand Up @@ -329,7 +329,7 @@ <h2>Rules for decision tree input</h2>
0.3 \times 200,000 + 0.6 \times 1,000,000 + 0.1 \times 3000,000 - 5,000 = 955,000
\]</span></p>
<p>The EMV from signing with the movie company is however <span class="math inline">\(960,000 - 5,000 = 955,000\)</span>. Hover the cursor over the chance node shown on screen to see a <code>tooltip</code> that shows the calculation. To highlight that a <code>cost</code> was specified the chance node in the figure has a dashed outer line.</p>
<p>In the <code>Sign contract</code> example it is clear that <code>Sign with Movie Company</code> is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the <em>Sensitivity</em> tab is useful. Here we can evaluate how decisions (e.g., <code>Sign with Movie Company</code> and <code>Sign with TV Network</code>) would chance if the legal fee changes. Enter 0 as the <code>Min</code> value, 80000 as the <code>Max value, 10000 as the</code>Step<code>size, and then press the &lt;i class=&quot;fa fa-plus&quot;&gt;&lt;/i&gt; icon. After pressing</code>Evaluate sensitivty<code>a graph will be show that illustrate how payoffs for the decision change. Notice that if the legal fee was higher than \$60,000,</code>Sign with TV Network` would produce the highest EMV.</p>
<p>In the <code>Sign contract</code> example it is clear that <code>Sign with Movie Company</code> is the prefered option. However, suppose the legal fees associated with this option were $10,000, or $30,000, would we still choose the same option? This is where the <em>Sensitivity</em> tab is useful. Here we can evaluate how decisions (e.g., <code>Sign with Movie Company</code> and <code>Sign with TV Network</code>) would change if the legal fee changes. Enter 0 as the <code>Min</code> value, 80000 as the <code>Max value</code>, 10000 as the <code>Step</code> size, and then press the <i class="fa fa-plus"></i> icon. After pressing <code>Evaluate sensitivty</code> a graph will be shown that illustrates how payoffs for the decisions change. Notice that for legal fees higher than $60,000 <code>Sign with TV Network</code> produces the highest EMV.</p>
<p align="center">
<img src="figures_model/dtree_sensitivity.png">
</p>
Expand Down
2 changes: 1 addition & 1 deletion multivariate/app/full_factor.md
Expand Up @@ -34,7 +34,7 @@ Together, the variables shown in each column (i.e., for each factor) help us to

The best way to see what rotation does is to toggle the `Rotation` radio buttons between `Varimax` and `None` and inspect what changes in the output after pressing the `Estimate` button. Click on the _Plot_ tab, set the radio button to `None`, and press the `Estimate` button to see updated results. The image shown below depicts the loadings of the variables on the two factors. Variable v5 falls somewhat in between the axes for factor 1 and factor 2. When we select Varimax rotation, however, the label for v5 lines up nicely with the horizontal axis (i.e., factor 2). This change in alignment is also reflected in the factor loadings. The unrotated factor loadings for v5 are -0.87 for factor 1 and -0.35 for factor 2. The rotated factor loadings for v5 are -0.93 for factor 1 and -0.08 for factor 2.

<p align="center"><img src="figures_multivariate/full_factor_plot.png) <img src="figures_multivariate/full_factor_plot_rotation.png"></p>
<p align="center"><img src="figures_multivariate/full_factor_plot.png"> <img src="figures_multivariate/full_factor_plot_rotation.png"></p>

The final step is to generate the factor scores. You can think of these scores as a weighted average of the variables that are linked to a factor. They approximate the scores that a respondent would have provided if we could have asked about the factor in a single question, i.e., the respondents inferred ratings on the factors. By clicking on the `Store` button two new variables will be added to the toothpaste data file (i.e., factor1 and factor2). You can see them by going to the _Data > View_ tab. We can use factor scores in other analyses (e.g., cluster analysis or regression). You can rename the new variables, e.g., to `health` and `social` through the _Data > Transform_ tab by selecting `Rename` from the `Transformation type` dropdown.

Expand Down
6 changes: 3 additions & 3 deletions multivariate/app/mds.md
Expand Up @@ -10,11 +10,11 @@ The basic measure of (lack of) fit for MDS is called `Stress`. If MDS cannot cre

<p align="center"><img src="figures_multivariate/mds_summary.png"></p>

In the graph from the screen grab of the _Plot_ tab shown below the relative locations of Los Angeles, Boston, etc. look wrong. This is due to the fact the MDS program has no information on North, South, East and West. We can ‘flip’ the plot in Radiant to see if map becomes easier to recognize and interpret.
In the graph from the screen grab of the _Plot_ tab shown below the relative locations of Los Angeles, Boston, etc. look wrong. This is due to the fact the MDS program has no information on North, South, East and West. We can _flip_ the plot in Radiant to see if map becomes easier to recognize and interpret.

<p align="center"><img src="figures_multivariate/mds_plot.png"></p>

To create the plot below we clicked the check-boxes for `dimension 1` and `dimension 2`. After ‘flipping’ the plot along both the horizontal and vertical axis we see that the relative locations of the cities look quite good. Note that this map is _flat_, i.e., there is no correction for the curvature of the earth.
To create the plot below we clicked the check-boxes for `dimension 1` and `dimension 2`. After _flipping_ the plot along both the horizontal and vertical axis we see that the relative locations of the cities look quite good. Note that this map is _flat_, i.e., there is no correction for the curvature of the earth.

<p align="center"><img src="figures_multivariate/mds_plot_flip.png"></p>

Expand All @@ -26,6 +26,6 @@ The following plot is based on similarity data for a set of toothpaste brands (`

The coordinates shown in the _Summary_ tab are used to plot the brands in two dimensions in the _Plot_ tab. In the plot we see that Aqua Fresh and Colgate as well as Ultra Brite and Pepsodent are located very close together. This is consistent with the original data. Sensodyne and Crest, however, are positioned at opposite ends of the plot. Again, this is consistent with the original data and provides visual confirmation that MDS was able to create a plot that fits the data well.

From the plot a manager might conclude that the brands that are closest together in the map are perceived by consumers as close substitutes and, hence, close competitors in the minds of consumers in this market segment. A manager for Aqua Fresh or Macleans, in contrast, might focus less on Sensodyne when developing a competitive positioning plan for her brand. An important limitation of brand maps based on (dis)similarity data is that the axes are difficult to interpret. For example, why are Close-up and Crest located at opposite ends along the horizontal axes? The researcher could ask respondents to explain the meaning of the axes or else obtain additional attribute information for the brands and correlate/overlay these on the plot to facilitate interpretation. Such attribute data could, however, also be used to create a brand map without the need for (dis)similarity ratings (see _Multivariate > Maps > Attribute_.
From the plot a manager might conclude that the brands that are closest together in the map are perceived by consumers as close substitutes and, hence, close competitors in the minds of consumers in this market segment. A manager for Aqua Fresh or Macleans, in contrast, might focus less on Sensodyne when developing a competitive positioning plan for her brand. An important limitation of brand maps based on (dis)similarity data is that the axes are difficult to interpret. For example, why are Close-up and Crest located at opposite ends along the horizontal axes? The researcher could ask respondents to explain the meaning of the axes or else obtain additional attribute information for the brands and correlate/overlay these on the plot to facilitate interpretation. Such attribute data could, however, also be used to create a brand map without the need for (dis)similarity ratings (see _Multivariate > Maps > Attribute_).

<p align="center"><img src="figures_multivariate/mds_plot_tpbrands.png"></p>
2 changes: 1 addition & 1 deletion multivariate/full_factor.html
Expand Up @@ -314,7 +314,7 @@ <h3>Example: Toothpaste</h3>
</ul>
<p>The best way to see what rotation does is to toggle the <code>Rotation</code> radio buttons between <code>Varimax</code> and <code>None</code> and inspect what changes in the output after pressing the <code>Estimate</code> button. Click on the <em>Plot</em> tab, set the radio button to <code>None</code>, and press the <code>Estimate</code> button to see updated results. The image shown below depicts the loadings of the variables on the two factors. Variable v5 falls somewhat in between the axes for factor 1 and factor 2. When we select Varimax rotation, however, the label for v5 lines up nicely with the horizontal axis (i.e., factor 2). This change in alignment is also reflected in the factor loadings. The unrotated factor loadings for v5 are -0.87 for factor 1 and -0.35 for factor 2. The rotated factor loadings for v5 are -0.93 for factor 1 and -0.08 for factor 2.</p>
<p align="center">
&lt;img src=figures_multivariate/full_factor_plot.png) <img src="figures_multivariate/full_factor_plot_rotation.png">
<img src="figures_multivariate/full_factor_plot.png"> <img src="figures_multivariate/full_factor_plot_rotation.png">
</p>
<p>The final step is to generate the factor scores. You can think of these scores as a weighted average of the variables that are linked to a factor. They approximate the scores that a respondent would have provided if we could have asked about the factor in a single question, i.e., the respondents inferred ratings on the factors. By clicking on the <code>Store</code> button two new variables will be added to the toothpaste data file (i.e., factor1 and factor2). You can see them by going to the <em>Data &gt; View</em> tab. We can use factor scores in other analyses (e.g., cluster analysis or regression). You can rename the new variables, e.g., to <code>health</code> and <code>social</code> through the <em>Data &gt; Transform</em> tab by selecting <code>Rename</code> from the <code>Transformation type</code> dropdown.</p>
<p>To download the factor loadings to a csv-file click the download button on the top-right of the screen.</p>
Expand Down
6 changes: 3 additions & 3 deletions multivariate/mds.html
Expand Up @@ -296,11 +296,11 @@ <h3>Example 1</h3>
<p align="center">
<img src="figures_multivariate/mds_summary.png">
</p>
<p>In the graph from the screen grab of the <em>Plot</em> tab shown below the relative locations of Los Angeles, Boston, etc. look wrong. This is due to the fact the MDS program has no information on North, South, East and West. We can flip the plot in Radiant to see if map becomes easier to recognize and interpret.</p>
<p>In the graph from the screen grab of the <em>Plot</em> tab shown below the relative locations of Los Angeles, Boston, etc. look wrong. This is due to the fact the MDS program has no information on North, South, East and West. We can <em>flip</em> the plot in Radiant to see if map becomes easier to recognize and interpret.</p>
<p align="center">
<img src="figures_multivariate/mds_plot.png">
</p>
<p>To create the plot below we clicked the check-boxes for <code>dimension 1</code> and <code>dimension 2</code>. After flipping the plot along both the horizontal and vertical axis we see that the relative locations of the cities look quite good. Note that this map is <em>flat</em>, i.e., there is no correction for the curvature of the earth.</p>
<p>To create the plot below we clicked the check-boxes for <code>dimension 1</code> and <code>dimension 2</code>. After <em>flipping</em> the plot along both the horizontal and vertical axis we see that the relative locations of the cities look quite good. Note that this map is <em>flat</em>, i.e., there is no correction for the curvature of the earth.</p>
<p align="center">
<img src="figures_multivariate/mds_plot_flip.png">
</p>
Expand All @@ -312,7 +312,7 @@ <h3>Example 2</h3>
<img src="figures_multivariate/mds_summary_tpbrands.png">
</p>
<p>The coordinates shown in the <em>Summary</em> tab are used to plot the brands in two dimensions in the <em>Plot</em> tab. In the plot we see that Aqua Fresh and Colgate as well as Ultra Brite and Pepsodent are located very close together. This is consistent with the original data. Sensodyne and Crest, however, are positioned at opposite ends of the plot. Again, this is consistent with the original data and provides visual confirmation that MDS was able to create a plot that fits the data well.</p>
<p>From the plot a manager might conclude that the brands that are closest together in the map are perceived by consumers as close substitutes and, hence, close competitors in the minds of consumers in this market segment. A manager for Aqua Fresh or Macleans, in contrast, might focus less on Sensodyne when developing a competitive positioning plan for her brand. An important limitation of brand maps based on (dis)similarity data is that the axes are difficult to interpret. For example, why are Close-up and Crest located at opposite ends along the horizontal axes? The researcher could ask respondents to explain the meaning of the axes or else obtain additional attribute information for the brands and correlate/overlay these on the plot to facilitate interpretation. Such attribute data could, however, also be used to create a brand map without the need for (dis)similarity ratings (see <em>Multivariate &gt; Maps &gt; Attribute</em>.</p>
<p>From the plot a manager might conclude that the brands that are closest together in the map are perceived by consumers as close substitutes and, hence, close competitors in the minds of consumers in this market segment. A manager for Aqua Fresh or Macleans, in contrast, might focus less on Sensodyne when developing a competitive positioning plan for her brand. An important limitation of brand maps based on (dis)similarity data is that the axes are difficult to interpret. For example, why are Close-up and Crest located at opposite ends along the horizontal axes? The researcher could ask respondents to explain the meaning of the axes or else obtain additional attribute information for the brands and correlate/overlay these on the plot to facilitate interpretation. Such attribute data could, however, also be used to create a brand map without the need for (dis)similarity ratings (see <em>Multivariate &gt; Maps &gt; Attribute</em>).</p>
<p align="center">
<img src="figures_multivariate/mds_plot_tpbrands.png">
</p>
Expand Down

0 comments on commit 48909f8

Please sign in to comment.