search for: logreg

Displaying 19 results from an estimated 19 matches for "logreg".

2006 Jun 06
2
Error in inherits(x, "data.frame") : object "Dataset" not found
I have been trying to run a logistic regression using a number of studies. Below is the syntax, error message & data. Any advice regarding what I am doing wrong or solutions are appreciated, regards Bob Green > logreg <- read.csv("c:\\logregtest.csv",header=T) > attach(logreg) > names(logreg) [1] "medyear" "where" "who" "dxbroad" "firstep" "standard" [7] "age" "sex" "successes...
2005 Feb 10
1
skip missing values in plots
I really like these Trellis graphics but how do I get this code to skip the missing? logreg<-read.csv("logreg.csv", header=TRUE, sep=",", na.string=" ") attach(logreg) bwplot(yesno~bc_pcb_tot |varlist, data=logreg, main="Box Cox PCB transformation", auto.key=TRUE, fontfamily = "HersheySans" ) Dean Sonneborn M.S. Public Health Scien...
2005 Jul 19
2
Regression lines for differently-sized groups on the same plot
...has all the rows that are not hemlock species replaced with #"NA"s. hemhem=glm(hempresence~logarea, family=binomial(logit), data=hemdata) hemyb=glm(hempresence~logarea, family=binomial(logit), data=birchdata) hemsm=glm(hempresence~logarea, family=binomial(logit), data=mapledata) attach(logreg) #logreg is the full dataset plot(logarea, hempresence, xlab = "Surface area of log (m2)", ylab="Probability of hemlock seedling presence", type="n", font.lab=2, cex.lab=1.5, axes=TRUE) lines(logarea,fitted(hemhem), lty=1, lwd=2) lines(logarea,fitted(hemyb), lty=&quo...
2008 Oct 23
0
error when using logistic.display within a loop
...ackage in a list, but got an error message "Error in eval(expr, envir, enclos) : y values must be 0 <= y <= 1". All the response variables have value of 0 or 1. It worked well for summary and anova but not for logistic.display in the loop. Thanks for any help, Tom logreg1<-vector("list", length(l)) logreg.anov1<-vector("list",length(l)) logreg.summ1<-vector("list",length(l)) logreg.conf1<-vector("list",length(l)) for (i in c(13:16)){ logreg1[[i-x]]<-glm(dat[,i]~group + age, family=binomial, data=Ndat) log...
2008 Oct 17
1
Package
Hi, I was trying to plot the logistic regression from a regression "logreg" I just ran. I downloaded the "car" package from the R website and went to Packages -> install package from local zip file I checked in my library file and the package is there. I restarted R. I then ran the command: reg.line(logreg,col=palette()[2], lwd=2, lty=1) And I get the e...
2003 Dec 05
3
Odds ratios for categorical variable
...vels. I see r-help inquiries regarding odds ratios for what looked like a continuous predictor variable. I was wondering how to get the pairwise odds ratios for comparisons of levels of a categorical predictor variable. I can't seem to get the correct output using: > sp.glm=glm(cohort$logreg~cohort$hab, family=binomial) > summary(sp.glm) This gives me the coefficient for the effect of hab overall, but not the coefficients for the comparisons of each of the levels. I suspect this has something to do with the contrasts statement, but I can't figure it out, and would be very a...
2008 Mar 18
1
how to reset slogic.f file
Hi there: recently i try to use LogicReg package for a tree model(logistics fit ) . i list my code and error below: > dim(model.dat) [1] 48000 745 > fit1 <- logreg(resp = model.dat[,745], bin=model.dat[, 9:700], type = 3, select = 3, ntrees = c(1,2), nleaves=c(1,7), ) Insufficient declaration LGCn1MAX in logreg() is 20000 LGCn1MAX should be at least 48000 Please fix and recompile.... i find the help file which said i need to reset them in *slogic.f* a...
2012 Jan 10
1
grplasso
...sso regression? ? Looks like this is the grouping part: ? index<-c(NA,) ? but I'm not sure how to specify the df for the variables past the NA for the intercept. ? Once that's defined the penalty can be specified: ? lambda <- lambdamax(x, y = y, index = index, penscale = sqrt, model = LogReg()) * 0.5^(0:5)? In my case I'd use LinReg for the model.? ? Then the model: ? fit <- grplasso(x, y = y, index = index, lambda = lambda, model = LogReg(), penscale = sqrt, control = grpl.control(update.hess = "lambda", trace = 0)) ? again using LinReg for the model. This can be pl...
2008 Oct 14
1
library MICE warning message
Hello. I have run the command imp<-mice(mydata, im=c("","pmm","logreg","logreg"),m=5)  for a variable with no missing data, a numeric one and two variables with binary data. I got the following message: There were 37 warnings (use warnings() to see them) > warnings() Warning messages: 1: In any(predictorMatrix[j, ]) ... : coercing argument of t...
2004 Sep 22
5
Issue with predict() for glm models
[This email is either empty or too large to be displayed at this time]
2005 Feb 23
1
Problem saving logic regression result equation to disk file
...mes(X) <- paste("case", 1:nrow(X), sep="") # Define expected result: Y = (NOT X2) AND X6 Y <- as.numeric(!X[,2] & X[,6]) # set seed for reproducible test set.seed(19937) # 100 interations too few: some results in single node with |Parameter| < 1 Annealing <- logreg.anneal.control(start = -1, end = -4, iter = 500, update = 50) logicfit <- logreg(resp=Y, bin=X, type = REGRESSION.TYPE<-2, select = FIT.SINGLE.MODEL<-1, ntrees=1, nleaves=2, # force shape of final tree...
2008 May 19
0
How to get confidence interval and coefficient in Logic Regression
...lt;- paste("X", 1:ncol(X), sep="") rownames(X) <- paste("case", 1:nrow(X), sep="") # Define expected result: Y = (NOT X1) AND X5 Y <- as.numeric(!X[,1] & X[,5]) z<-as.numeric(runif(50)) model.dat<-cbind(X,z,Y) set.seed(12345) Annealing <- logreg.anneal.control(start = 4, end = -4, iter = 1000, update = 50) logicfit <- logreg(resp=model.dat[,10], bin=model.dat[,1:8],sep=model.dat[,9], type = 3, select = 2, ntrees=2, nleaves=3, anneal.control=An...
2008 Jul 09
0
problems using mice()
R 2.7.2 PPC Mac OS X 10.4.11 library mice 1.13.1 I try to use mice for multivariate data imputation. My variables are numeric, factors, count data, ordered factors. First I created a vector for the methods to use with each variable ImpMethMice<-c(rep("logreg", 62), rep("polyreg",1), rep("norm",12), rep("polyreg",12)) next step was Test<-mice(df, im=ImpMethMice) I got the following error message: iter imp variable 1 1 variablenameFehler in impute.logreg(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 2L,...
2011 May 11
1
Recompile a package
...but which in essence actually have no restrictions. So if one needs to change them, he sure can, only that he has to change a file with an .f or .ff extension (I believe that it stands for Fortran code, but I am not sure) and then recompile it. http://finzi.psych.upenn.edu/R/library/LogicReg/html/logreg.html I have found several posts in the mailing-archive, but they seem to deal with Windows. And I have a Gentoo-based distro. I have also found a manual "Installation and Administration". But it all seems to be destined for developers... and usually talks about creating your own package...
2004 Sep 23
0
followup: Re: Issue with predict() for glm models
...ies for Test Data # >>>> >>>>########################### >>>> >>>> >>>>>New.Data <- data.frame(predictors.train1=predictors.test[,1], >>>>>predictors.train2=predictors.test[,2]) >>>>> >>>>>logreg.pred.prob.test <- >>>> >>>>predict.glm(log.reg,New.Data,type="response") >>>> >>>> >>>>>logreg.pred.prob.test >>>> >>>>Instead, use: >>>> >>>> test <- data.frame(predictor...
2007 May 17
1
MICE for Cox model
...;status','age','sex','hepmeg','platelet', 'trt', 'trig')] d[d==-9] <- NA d[,c(4,5,7)] <- lapply(d[,c(4,5,7)], FUN=as.factor) str(d) imp <- mice(d, m=10, maxit=10, diagnostics=T, seed=500, defaultImputationMethod=c('norm', 'logreg', 'polyreg')) fit <- cox.mids(Surv(time,status) ~ age + sex + hepmeg + platelet + trt + trig, imp) pool(fit) ------------ I have looked at the "pool" function but cannot figure out what I have done wrong. Would really appreciate any help with this. Thanks, Brant Inm...
2007 Nov 30
0
problem using MICE with option "lda"
...is. To illustrate my problem I have created a dataset, which consists of 1 continuous and 1 binary variable. The continuous variable is complete and the binary variable is partially observed. I am able to impute using the MICE command where the imputation methods is logistic regression (option logreg). However I have been unsuccessful when I've tried to impute the binary variable using linear discriminant analysis (option lda) Instead I get the following error message "Error in colMeans(as.matrix(imp[[visitSequence[j]]])) : 'x' must be numeric" I can however impute usi...
2009 Apr 04
0
multiple imputation
...0 5 0 0 6 1 NA 7 1 NA 8 0 1 9 0 0 10 0 0 11 0 NA 12 0 0 13 0 NA 14 0 0 15 0 0 16 0 1 17 0 0 18 0 0 19 0 0 20 0 NA I tried calling the function mice.impute.logreg and mi.dichotomous - both giving me errors in return. I'm quite sure I'm doing it incorrectly, so, I would really appreciate it if someone can show me how. Thanks in advance! :) Cheers,Yen [[alternative HTML version deleted]]
2009 Apr 22
1
Multiple imputations : wicked dataset ? Wicked computers ? Am I cursed ? (or stupid ?)
...emed involved every time. The "textbook example" (example for amelia function) runs perfectly. Package "mice" (Stef van Buuren & Karin Groothuis-Oudshoorn) : > system.time(DataTest.mice<-mice(DataTest,m=5)) iter imp variable 1 1 cadredpErreur dans mice.impute.logreg(c(1L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 2L, : dims [produit 28] ne correspond pas ? la longueur de l'objet [31] De plus : Warning message: In beta + rv %*% rnorm(ncol(rv)) : la taille d'un objet plus long n'est pas multiple de la taille d'un objet plus court Timing stopped at: 0...