Different results from rxLinMod(), lm(), and SAS

Differences between rxLinMod and lm results are typically due to rxLinMod's regression using different contrasts from what lm uses. From the rxLinMod help: "On the other hand, rxLinMod by default uses a set of contrasts that drop the last level of each factor. Setting dropFirst=TRUE will give results more akin to those of lm."

rxLinMod was designed to produce results matching SAS's results by default. If the default rxLinMod results still do not match the SAS results or there are no factor variables, check whether the rxLinMod call uses fweights or pweights.

rxLinMod() allows both "pweights" and "fweights" and the former corresponds to the weights used by SAS and R. "fweights" are extremely useful for some types of computations, though most other programs do not support them.

Changing "fweights" to "pweights" in the call to rxLinMod should get the same results as R and SAS.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

ID článku: 3104226 - Poslední kontrola: 10/29/2015 06:41:00 - Revize: 1.0

Revolution Analytics

  • KB3104226
Váš názor