Restructured some files

main
Corentin Choisy 8 months ago
parent ad3ce98415
commit af45e435f9

Binary file not shown.

@ -1,201 +1,3 @@
stop("Models RSM and GRSM cannot be used for unequal numbers of response categories!")
}
design_list <- design_GPCMlasso(formula = formula, data = data,
Y = Y, RSM = RSM, GPCM = GPCM, DSF = DSF, all.dummies = control$all.dummies,
main.effects = main.effects)
if (design_list$m == 0) {
control$lambda <- 0
control$adaptive <- FALSE
cv <- FALSE
}
if (length(control$lambda) == 1) {
cv <- FALSE
}
loglik_fun <- loglikPCMlasso
score_fun <- scorePCMlasso
log_score_fun <- loglikscorePCMlasso2
if (all(k == 2)) {
loglik_fun <- loglikDIFlasso
score_fun <- scoreDIFlasso
log_score_fun <- loglikscoreDIFlasso2
}
fit <- fit_GPCMlasso(model = model, loglik_fun = loglik_fun, acoefs2 = acoefs2,
score_fun = score_fun, log_score_fun, design_list = design_list,
control = control, start = NULL, scale_fac = 1, main.effects = main.effects)
if (is.null(control$lambda)) {
control$lambda <- fit$lambda
}
coefficients <- fit$coefficients
coef.rescal <- fit$coef.rescal
logLik <- fit$logLik
df <- fit$df
BIC <- -2 * logLik + log(design_list$n) * df
AIC <- -2 * logLik + 2 * df
cAIC <- -2 * logLik + 2 * df + 2 * df * (df - 1)/(design_list$n -
df - 1)
if (cv) {
cv_error <- fit_cv_GPCMlasso(model, design_list, control,
score_fun, loglik_fun, log_score_fun, Y)
}
else {
cv_error <- NULL
}
ret.list <- list(coefficients = coefficients, logLik = logLik,
cv_error = cv_error, call = match.call(), model = model,
data = data, control = control, DSF = DSF, formula = formula,
item.names = item.names, Y = Y, design_list = design_list,
AIC = AIC, BIC = BIC, cAIC = cAIC, df = df, coef.rescal = coef.rescal,
main.effects = main.effects)
class(ret.list) <- "GPCMlasso"
return(ret.list)
}
GPCMlasso2 <- function (formula, data, DSF = FALSE, model = c("PCM", "RSM",
"GPCM", "GRSM", "RM", "2PL"), control = ctrl_GPCMlasso(),
cv = FALSE, main.effects = TRUE,acoefs2=NULL)
{
if (!is.data.frame(data))
stop("data has to be a data.frame!")
Y <- model.response(model.frame(formula, data = data))
for (i in 1:ncol(Y)) {
Y[, i] <- as.factor(Y[, i])
}
item.names <- colnames(Y)
model <- match.arg(model)
RSM <- GPCM <- FALSE
if (model %in% c("GRSM", "RSM")) {
RSM <- TRUE
}
if (model %in% c("GRSM", "GPCM", "2PL")) {
GPCM <- TRUE
}
k <- apply(Y, 2, function(x) {
length(levels(as.factor(x)))
})
if (all(k == 2) | model %in% c("RM", "2PL")) {
DSF <- FALSE
control$cv.crit <- "deviance"
}
if (length(unique(k)) > 1 & RSM) {
stop("Models RSM and GRSM cannot be used for unequal numbers of response categories!")
}
design_list <- design_GPCMlasso(formula = formula, data = data,
Y = Y, RSM = RSM, GPCM = GPCM, DSF = DSF, all.dummies = control$all.dummies,
main.effects = main.effects)
if (design_list$m == 0) {
control$lambda <- 0
control$adaptive <- FALSE
cv <- FALSE
}
if (length(control$lambda) == 1) {
cv <- FALSE
}
loglik_fun <- loglikPCMlasso
score_fun <- scorePCMlasso
log_score_fun <- loglikscorePCMlasso2
if (all(k == 2)) {
loglik_fun <- loglikDIFlasso
score_fun <- scoreDIFlasso
log_score_fun <- loglikscoreDIFlasso2
}
fit <- fit_GPCMlasso(model = model, loglik_fun = loglik_fun, acoefs2 = acoefs2,
score_fun = score_fun, log_score_fun, design_list = design_list,
control = control, start = NULL, scale_fac = 1, main.effects = main.effects)
if (is.null(control$lambda)) {
control$lambda <- fit$lambda
}
coefficients <- fit$coefficients
coef.rescal <- fit$coef.rescal
logLik <- fit$logLik
df <- fit$df
BIC <- -2 * logLik + log(design_list$n) * df
AIC <- -2 * logLik + 2 * df
cAIC <- -2 * logLik + 2 * df + 2 * df * (df - 1)/(design_list$n -
df - 1)
if (cv) {
cv_error <- fit_cv_GPCMlasso(model, design_list, control,
score_fun, loglik_fun, log_score_fun, Y)
}
else {
cv_error <- NULL
}
ret.list <- list(coefficients = coefficients, logLik = logLik,
cv_error = cv_error, call = match.call(), model = model,
data = data, control = control, DSF = DSF, formula = formula,
item.names = item.names, Y = Y, design_list = design_list,
AIC = AIC, BIC = BIC, cAIC = cAIC, df = df, coef.rescal = coef.rescal,
main.effects = main.effects)
class(ret.list) <- "GPCMlasso"
return(ret.list)
}
GPCMlasso2(formula = cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control=ctrl_GPCMlasso(lambda=0.0000000000001),acoefs2 = u)
u
## create responses for acat from ordinal values
createResponse <- function(Y){
Y <- as.factor(Y)
model.matrix(~0+Y)[,-length(levels(Y))]
}
design_GPCMlasso <- function(formula = formula, Y=Y, data = data, RSM = RSM,
GPCM = GPCM, DSF = DSF, all.dummies = TRUE, main.effects = main.effects){
## extract covariates
if(all.dummies){
term.labels <- attr(terms(formula), "term.labels")
X <- matrix(rep(1,nrow(data)))
for(ij in 1:length(term.labels)){
x.now <- data[,term.labels[ij], drop = FALSE]
if(is.factor(x.now[,1])){
if(nlevels(x.now[,1])==2){
X <- cbind(X,model.matrix(~.,data=x.now)[,-1,drop=FALSE])
}else{
X <- cbind(X,model.matrix(~0+.,data=x.now))
}
}else{
X <- cbind(X,model.matrix(~.,data=x.now)[,-1,drop=FALSE])
}
}
X <- X[,-1,drop = FALSE]
}else{
X <- model.matrix(formula, data = data)
if(ncol(X)>=1){
if(colnames(X)[1]=="(Intercept)"){
X <- X[,-1,drop = FALSE]
}
}
}
x.names <- colnames(X)
## factorize response vector
## initialize basic parameters
k <- apply(Y, 2, function(x){length(levels(as.factor(x)))})
q <- k-1
n <- nrow(Y)
I <- ncol(Y)
m <- ncol(X)
n_sigma <- 1
if(GPCM){
n_sigma <- I
}
## get final response vector
if(all(q==1)){
response <- as.numeric(as.factor(c(t(Y))))-1
}else{
response <- lapply(as.data.frame(Y),createResponse)
response <- c(t(do.call("cbind",response)))
}
## total number of parameters to be optimized
px <- sum(q)+n_sigma
if(RSM){
px <- q[1]+I+n_sigma-1
}
## scale X and save standard deviations for re-scaling
# X <- scale(X, center = FALSE)
X <- scale(X, center = FALSE, scale = apply(X, 2, sd, na.rm = TRUE))
sd.vec <- attributes(X)$scale
sd.vec <- create.sd.vec(sd.vec, DSF, px, n_sigma, I, q, main.effects)
## create design matrix for basic item parameters
if(!RSM){
design <- -diag(px-n_sigma)
}else{
design <- -cbind(matrix(rep(diag(I),each=q[1]),ncol=I),
matrix(rep(diag(q[1]),I),ncol=q[1],byrow = TRUE))[,-(I+1)]
}
## create design matrix for covariate part
if(m>=1){
@ -510,3 +312,201 @@ GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT:item1tt+TT:item2TT+TT:item3t
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT:item1tt+TT:item2tt+TT:item3tt+TT:item4tt,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT*item1tt,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT*item1tt+TT*item2tt+TT*item3tt+TT*item4tt,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
library(mirt)
model.pcm <- "hrqol = 1-4"
mirt(data = aaaa[,paste0("item",1:4)])
mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "Rasch",SE=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "Rasch",SE=T))
coef(mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "PCM",SE=T))
coef(mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "GPCM",SE=T))
coef(mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "Rasch",SE=T))
coef.pcm <- coef(mirt(data = aaaa[,paste0("item",1:4)],model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm
coef.pcm <- coef(multipleGroup(data = aaaa[,paste0("item",1:4)],group="TT",model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
multipleGroup(data = aaaa[,paste0("item",1:4)],group="TT",model=model.pcm,itemtype = "Rasch",SE=T)
coef.pcm <- coef(multipleGroup(data = aaaa[,paste0("item",1:4)],group=aaaa$TT,model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm <- coef(multipleGroup(data = aaaa[,paste0("item",1:4)],group=as.character(aaaa$TT),model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm
library(TAM)
tam.mml(resp=aaaa[,c("item1","item2","item3","item4")],group=aaaa$TT)
coef.pcm
coef.pcm <- coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa$TT,formula=hrqol~TT,model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm <- coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=hrqol~TT,model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm <- coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=c(hrqol=as.formula("~TT")),model=model.pcm,itemtype = "Rasch",SE=T),IRTpars=T,simplify=T)
coef.pcm <- coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=c(hrqol=as.formula("~TT")),model=model.pcm,itemtype = "Rasch",SE=T))
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=c(hrqol=as.formula("~TT")),model=model.pcm,itemtype = "Rasch",SE=T)
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch",SE=T)
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch")
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"))
tam.mml(resp=aaaa[,c("item1","item2","item3","item4")],group=aaaa$TT)
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch")
aaa <- read.csv(paste0('/home/corentin/Documents/These/Recherche/Simulations/Data/DIF/N',100,'/scenario_',"6A_100",'.csv'))
aaaa <- aaa[aaa$replication==1,]
tam.mml(resp=aaaa[,c("item1","item2","item3","item4")],group=aaaa$TT)
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "GPCM")
mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch")
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"))
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"),simplify=T)
coef(tam.mml(resp=aaaa[,c("item1","item2","item3","item4")],group=aaaa$TT))
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"),simplify=T)
model.pcm <- "hrqol = 1*TT+2-4"
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"),simplify=T)
model.pcm <- "hrqol = 1-4"
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT,model=model.pcm,itemtype = "Rasch"),simplify=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT+TT:item1,model=model.pcm,itemtype = "Rasch"),simplify=T)
aaaa$dif1
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T)
tam.mml(resp=aaaa[,c("item1","item2","item3","item4")],group=aaaa$TT)
aaaa[aaaa$TT==1,]$item4TT <- aaaa[aaaa$TT==1,]$item4
aaaa
aaaa[aaaa$TT==1,]$item4TT <- aaaa[aaaa$TT==1,]$item4
aaaa[aaaa$TT==1,]$item4
aaaa
aaaa[aaaa$TT==1,]$item4TT <- 0
aaaa[aaaa$TT==1,]$item4TT
aaaa[aaaa$TT==1,]
aaaa[aaaa$TT==1,"item4tt"] <- aaaa[aaaa$TT==1,"item4"]
aaaa
aaaa[aaaa$TT==0,"item4nott"] <- aaaa[aaaa$TT==0,"item4"]
tam.mml(resp=aaaa[,c("item1","item2","item3","item4tt","item4nott")],group=aaaa$TT)
Summary(tam.mml(resp=aaaa[,c("item1","item2","item3","item4tt","item4nott")],group=aaaa$TT))
summary(tam.mml(resp=aaaa[,c("item1","item2","item3","item4tt","item4nott")],group=aaaa$TT))
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa,formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
aaaa
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa[,1:9],formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
summary(tam.mml(resp=aaaa[,c("item1","item2","item3","item4tt","item4nott")],group=aaaa$TT))
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa[,1:9],formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa[,1:9],formula=~TT+TT*item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa[,1:9],formula=~TT+TT:item4,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
coef(mirt(data = aaaa[,paste0("item",1:4)],covdata=aaaa[,1:9],formula=~TT,model=model.pcm,itemtype = "Rasch"),simplify=T,IRTpars=T)
model.pcm <- "hrqol = 1-4"
multipleGroup(data = aaaa[,paste0("item",1:4)],group=as.character(aaaa$TT),model=model.pcm,itemtype = "Rasch")
zzz <- multipleGroup(data = aaaa[,paste0("item",1:4)],group=as.character(aaaa$TT),model=model.pcm,itemtype = "Rasch")
DIF(zzz,items2test = 4,groups2test = "TT")
DIF(zzz,items2test = 4,groups2test = "TT",which.par = c("a1","d"))
DIF(zzz,items2test = 4,groups2test = "TT",which.par = c("hrqol"))
DIF(zzz,items2test = 4,groups2test = "TT",which.par = c("item1"))
zzz
coef(zzz)
DIF(zzz,items2test = 4,groups2test = "TT",which.par = c("a1"))
DIF(zzz,items2test = 4,which.par = c("a1"))
DIF(zzz,items2test = 4,which.par = c("a1"),return_models = T)
DIF(zzz,items2test = 4,which.par = c("a1"),return_models = T)
DIF(zzz,items2test = 4,which.par = c("a1"),return_models = F)
zzzz<- DIF(zzz,items2test = 4,which.par = c("a1"))
zzzz<- DIF(zzz,items2test = 4,which.par = c("a1"),return_seq_model = T)
zzzz<- DIF(zzz,items2test = 4,which.par = c("g"),return_seq_model = T)
coef(zzz)
zzzz<- DIF(zzz,items2test = 4,which.par = c("d1","d2","d3"),return_model = T)
zzzz<- DIF(zzz,items2test = 4,which.par = c("d1","d2","d3"))
zzzz
install.packages('/home/corentin/Documents/These/Packages/GPCMlasso_0.1-7.tar.gz')
library(GPCMlasso)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000000000),DSF = F,cv=F)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
library(TAM)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
coef(tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT))
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0.1),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
?GPCMlasso
?GPCMlasso
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F,main.effects = F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000),DSF = F,cv=F,main.effects = F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4,item4tt)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
aaaa[aaaa$TT==1,"item4tt"] <- aaaa[aaaa$TT==1,"item4"]
GPCMlasso(formula=cbind(item1,item2,item3,item4,item4tt)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4,item4tt)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4tt)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10),DSF = F,cv=F)
0.265*log(10)
0.265*log(100)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000),DSF = F,cv=F)
0.265/1/log(100)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000),DSF = F,cv=F)$coef.rescal
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 100000000000),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)$coefficients
install.packages("/home/corentin/Documents/These/Packages/GPCMlasso_0.1-7.tar.gz")
library(GPCMlasso)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
library(TAM)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0),DSF = F,cv=F)
tam.mml(aaaa[,c("item1","item2","item3",'item4')])
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,lambda2=0),DSF = F,cv=F)
install.packages("/home/corentin/Documents/These/Packages/GPCMlasso_0.1-7.tar.gz")
library(GPCMlasso)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,lambda2=0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 1000,lambda2=0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,lambda2=1000),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,lambda2=0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,lambda2=100),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 100,lambda2=0),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 100,lambda2=0,adaptative=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 100,lambda2=0,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 0,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)$coefficients
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)$coef.rescal
library(TAM)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-8,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-4,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-18,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-2,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-3,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=1e-2.5,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0.0005,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0.001,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0.01,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0.005,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0.002,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-1,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-0.1,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-0.0001,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-10,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-10000,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-100000,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=10000000000000000000000000000000000000000,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=-10000000000000000000000000000000000000000,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,lambda2=0,adaptive=F),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=0,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=1000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=-1000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=-10,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=0,adaptive=T),DSF = F,cv=F)$coef.rescal
0.265/0.09
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.lambda=0,adaptive=T),DSF = F,cv=F)$coef.rescal
1.1479/0.4403
0.265/0.09
0.265/0.036
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)
1.1479/0.0001
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,ada.power=2,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=0,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=0.000001,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=1,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="PCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="RM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GRM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="2PL",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GPCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)$coef.rescal
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GPCM",control = ctrl_GPCMlasso(lambda = 10000,cvalue=10000,adaptive=T),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GPCM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GPCM",control = ctrl_GPCMlasso(lambda = 10000000,adaptive=F),DSF = F,cv=F)
GPCMlasso(formula=cbind(item1,item2,item3,item4)~TT,data=aaaa,model="GRSM",control = ctrl_GPCMlasso(lambda = 10000,adaptive=F),DSF = F,cv=F)
tam.mml(aaaa[,c("item1","item2","item3",'item4')],group=aaaa$TT)

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save