Category:Analytica tool

From Opasnet
Jump to: navigation, search

Analytica tool contains Analytica models and modules that are useful for performing a particular phase in an assessment process.

Lessons from Analytica - wiki interface

Question: Can Analytica files be copy-pasted to respective wiki pages directly?

Analytica files are basically text files, so the storage of code should be simple. We tested the use of <anacode></anacode> tag and copy-pasting the file text directly into a wiki page (see beneris:Variable:Food consumption and nutrient intake in Finland). Result: most rows start with space and show with fixed-width font, but some don't. This looks ugly. If spaces are added to the text, it does NOT convert into a readable Analytica file.

Conclusion: don't use direct copy-pasting of the code. Instead, upload the Analytica file into the wiki system.

Question: Can you use Analytica to openly compute results from restricted original data?

You may want to share the model and the code you use, but you might not want to share the original data that you use. There are two possibilities to do this. If you have Analytica Enterprise, you can obfuscate (encrypt) the model so that the definitions of any part can be hidden (see Analytica Users Guide). But then you must be careful to only share the obfuscated version and carefully maintain the original with yourself. If you don't have it, you can use the poor-man's version.

Analytica models can use external data within the models. The most practical way to do this is to make an OLE link to e.g. an Excel file. This is done by making a two-dimensional Analytica table with the right size. Then copy a rectangle from Excel and use Paste Special to bring it to Analytica. Choose Paste Link as the option. In addition to the data, the location of the original file and cells is stored into the Analytica table node. When the model is closed and opened again, the model checks for updated from the original file. For more details, see the Analytica Users Guide.

NOTE! The original data is stored within the model. If you want to share only the model but not the original data, you must do the following: Open the Analytica model in a text editor (for options, see here). Then find the table node. It has a tag

<variable name="Name_of_table">

Within the variable tag, there is another tag

<definition>Table(Row,Label)(number, number, number... (the contents of the table is shown here)...number)</definition>

Delete all contents except the following:


Then save the file. When you open the model, it updates the table from the original file, if available. If the original file is unavailable, the model opens normally but the table is empty.

Conclusion: These are fairly easy ways to share models without releasing restricted data.