I want to fit a plane to measured points, i.e., the function Z = aX + bY + c to data, where the Z coordinate (dependent variable) has a measurement error \sigma. The documentation for GLM.jl mentions that lm function can take a vector of weights, but I’m not sure what these weights are supposed to be. Can I simply use 1/\sigma^2 as the weights, similar to LsqFit.jl?

There’s a set of lecture notes on the linked thread that explains frequency, probability and analytical weights. In short, frequency here refers to the frequency of an observation.