Find filter coefficients to model a device using its measurement I am trying to realize a digital filter that has the same freq. response of an existing speaker. I have fed an audio sine sweep to the speaker and measured the speaker output, both at 48kHz. Then I perform FFTs of the input(X) and output(Y), divide the absolute values point-wise (absY./absX) to get the transfer function/freq. response (H).

Now I would like to determine the filter coefficients B and A for an FIR/IIR filter, so that I can model the speaker's response digitally. I understand my transfer function is in the domain of w, and filter coefficients are the coefficients of the difference equation of the filter.

This is where all my text-book theory seems to fall apart, and I was hoping someone could clarify:


If I understand correctly, since my data is discrete (sampled at 48k), my data is in terms of 'n'. If I performed an ifft of H (which is complex), the resulting vector is basically my filter coefficients?
Matlab suggests using invfreqz to find filter coefficients, given a complex frequency response. Does this function map from w to z domain? If so, am I right in understanding that the FFT needs to be converted to Z domain to derive its filter coefficients?
What parameters does a auto-regressive filter fit to? for eg: Yule_Walker, or Levinson, or if I want to run a gradient descent to fit a filter? What is the error calculated between?
We can represent a digital filter as:


A difference equation, relating input and output at every time step $n$:
$y[n] = \sum_{k=0}^{K-1} b[k] x[n-k] - \sum_{m=1}^{M} a[m] y[n-m]$. The filter coefficients are $b_k$ and $a_m$. In case of an FIR, $a[m] = 0\,\forall\, m $. This form is basically how the filter can be implemented (in the discrete time domain).
By z-Transform of the difference equation, we can also represent the above equation as: $Y(z) = \frac{\sum_{k=0}^{K-1} b[k] z^{-k}}{1 + \sum_{m=1}^{M} a[m] z^{-m}} X(z) = H(z)X(z)$. 
The frequency response is simply this z-Transform evaluated at the unit circle $H(z = \mathrm{e}^{j\omega})$ (this is often simply written as  $H(\omega)$).
The impulse response is the inverse transform of $H(\mathrm{e}^{j\omega})$. By convolution with the impulse response, we also can get the output of the filter, as in $y[n] = h[n] * x[n]$. However, $h[n]$ is only finite for an FIR (hence the name, obviously), where we can easily check that in fact it is simply the coefficients $b[k]$.


I hope this helps you with understanding the big picture. So to answer your questions:


The IFFT of the frequency response yields the impulse response. This corresponds directly to the filter coefficients only in the case of an FIR filter. In case you want to model your system as an IIR, you can use an algorithm such as the kind implemented in MATLAB's invfreqz, which is essentially an optimization to fit your frequency response to the complex rational function $H(z)$.
Yes, since $H(z)$ is a representation of the filter's difference equation, the coefficients of which are what we call filter coefficients. 


In any case, these are important basics you can learn from e.g. the classic book on DSP. Even the MATLAB documentation (which im sure you have already been checking) is a decent resource.