Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 3104226
Revision : 1
Created on : 1/7/2017
Published on : 10/29/2015
Exists online : False
Views : 66