I’m trying to reproduce an averaged switch model from Fundamentals of Power Electronics (Erickson & Maksimović) in LTspice. The book defines the subcircuit as:
****************************************************************
* Subcircuit: CCM1
* Application: two-switch PWM converters
* Limitations: ideal switches, CCM only, no transformer
****************************************************************
* Parameters: none
****************************************************************
* Nodes:
* 1: transistor positive (drain for an n-channel MOS)
* 2: transistor negative (source for an n-channel MOS)
* 3: diode cathode
* 4: diode anode
* 5: duty cycle control input
****************************************************************
.subckt CCM1 1 2 3 4 5
Et 1 2 value={(1-v(5))*v(3,4)/v(5)}
Gd 4 3 value={(1-v(5))*i(Et)/v(5)}
.ends
****************************************************************
The code simulates the large-signal, nonlinear averaged switch model shown below, obtained by averaging the switch network terminal waveforms

The authors describe the subcircuit as follows:

Fig. 14.18 is the Averaged switch model CCM1: (a) the general two-switch network; (b) symbol for the aver-
aged switch subcircuit model as shown below;

I have attempted to draw the schematic, matching the netlist described, in LTspice, as shown below.

However, when I run the simulation, I'm getting this error:

I'm new to LTSpice. I'm wondering how to implement a netlist like that in LTSpice. What could I be doing wrong? When running simulations, how should I decide whether to use voltage-controlled voltage sources and current sources, or their alternative controlling sources? Also, I would appreciate it if someone could point out relevant resources to help me master drawing and simulating in LTspice. I feel like I haven't mastered the basics yet, even after going through the tutorials on the LTspice website.

