[R] Possibly more coefficients?

abigailclifton at me.com abigailclifton at me.com
Mon Apr 2 01:30:17 CEST 2012


Hi there,

I have this code:
Prepared_Data <-  na.omit(read.csv("Prepared_Data.csv", header=TRUE))
pd <- Prepared_Data[,-3]  ## data minus response variable

lev <- sapply(pd,function(x) length(unique(x)))

## total parameters for n variables
par(las=1,bty="l")
plot(cumprod(lev),log="y")

library(Matrix)
m <- sparse.model.matrix(~.^2,data=pd) 
ncol(m) 

library(glmnet)
g1 <- glmnet(m,Prepared_Data$C3, family="binomial")
Coef(g1)



Which prints out the coefficients of g1. However there are very few numerical coefficients, and many dots. Is there any way to get numerical values for all factors/terms, making it a more complete model without lots of gaps?

Kind regards,

A 
Sent from my BlackBerry smartphone from Virgin Media



More information about the R-help mailing list