How to enter .subckt model in Ltspice?
For most simulators the first line in any spice file should be an asterisk *, and is always a comment line.

I do not think you should put the R= part in the resistor definition lines.  The lines should work fine like this:

R&lt;rname&gt; &lt;node1&gt; &lt;node2&gt; &lt;r_value&gt; 


For example:

RR1 1 3 'CR1+CR2*cos(CF1*pi*V(2,3))'


If this does not work, try defining the expression as a parameter first:

.PARAM R1VALUE='CR1+CR2*cos(CF1*pi*V(2,3))'


then define resistor values like:

RR1 1 3 R1VALUE


Also, it looks like in LTspice the .ends should have the subcircuit name afterwards, i.e.:

.ends SET


For particular nuances of each simulator check the documentation.