Displaying 1 result from an estimated 1 matches for "x4w".
Did you mean:
x4
2008 Mar 10
3
Weighting data when running regressions
...ression on a subset of my data file where WEIGHT is the name of my
weighting variable (numeric), e.g.:
library(foreign)
data1=read.spss("File.sav", use.value.labels = FALSE, to.data.frame = TRUE)
summary(data1) ' shows me all the variables OK
attach(data1)
linmod=lm(Y~X1+X2+X3+X4W, subset=(X5==1 & X6==7), weights==WEIGHT)
and I get the following Error message:
Error in weights == WEIGHT :
comparison (1) is possible only for atomic and list types
It works perfectly if I don't use the ", weights==WEIGHT" bit
Could you please let me know...