similar to: how to predict with logistic model in package logistf ?

Displaying 20 results from an estimated 200 matches similar to: "how to predict with logistic model in package logistf ?"

2005 Feb 07
3
problem with logistic regression
Hi, we try to do a logistic regression with the function glm. But we notice that this function don't give the same results as the SAS proc catmod (differents estimate given). We try to change the contrast on R system with: > options(contrasts=c(unordered="contr.SAS",ordered="contr.poly")) We also try with brlr and logistf functions. Unfortunately, the estimate
2006 Jan 12
1
Firths bias correction for log-linear models
Dear R-Help List, I'm trying to implement Firth's (1993) bias correction for log-linear models. Firth (1993) states that such a correction can be implemented by supplementing the data with a function of h_i, the diagonals from the hat matrix, but doesn't provide further details. I can see that for a saturated log-linear model, h_i=1 for all i, hence one just adds 1/2 to each count,
2011 Sep 27
1
model selection using logistf package
Hi everyone, I'm wondering how to select the "best" model when using logistf? AIC does not work neither does anova. I tried fitting a glm model but got the separation warning message so I tried using the logistf package but as I stepwise simplify the model I don't know if the simplification is motivated or not... Can anyone explain to me how I should approach this problem? I
2013 Feb 27
1
Separation issue in binary response models - glm, brglm, logistf
Dear all, I am encountering some issues with my data and need some help. I am trying to run glm analysis with a presence/absence variable as response variable and several explanatory variable (time, location, presence/absence data, abundance data). First I tried to use the glm() function, however I was having 2 warnings concerning glm.fit () : # 1: glm.fit: algorithm did not converge # 2:
2010 Mar 09
1
penalized maximum likelihood estimation and logistf
Hi, I got two questions and would really appreciate any help from here. First, is the penalized maximum likelihood estimation(Firth Type Estimation) only fit for binary response (0,1 or TRUE, FALSE)? Can it be applied to multinomial logistic regression? If yes, what's the formula for LL and U(beta_i)? Can someone point me to the right reference? Second, when I used *logistf *on a dataset with
2008 Sep 16
1
logistf error message
I am new to using R. Currently, I am using the logistf package to run logistic regression analysis. When I run the following line of code: attach(snpriskdata) logisticpaper<-logistf(sascasecon~saspackyrs+newsbmi+EDUCATION+sasagedx+sasflung+condobst+sasadultasprev) I get the following error message: Error in sum(y) : invalid 'type' (character) of argument What does this error
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2005 Jul 18
1
Survival dummy variables and some questions
Hi All, I am currently conducting some survival analyses. I would like to extract coefficients at each level of the IVs. I read on a previous posting that dummy regression using coxph was not possible. Therefore I though, hey why not categorize the variables (I realize some folks object to categorization but the paper I am replicating appears to have done so ...) and turn the variables
2006 Jan 31
1
warnings in glm (logistic regression)
Hello R users I ran more than 100 logistic regression analyses. Some of the analyses gave me this kind warning below. ########################################################### Warning messages: 1: algorithm did not converge in: glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, ... 2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y = Y,
2003 Dec 17
5
beginner programming question
Hi all, The last e-mails about beginners gave me the courage to post a question; from a beginner's perspective, there are a lot of questions that I'm tempted to ask. But I'm trying to find the answers either in the documentation, either in the about 15 free books I have, either in the help archives (I often found many similar questions posted in the past). Being an (still actual)
2004 Jan 25
3
warning associated with Logistic Regression
Hi All, When I tried to do logistic regression (with high maximum number of iterations) I got the following warning message Warning message: fitted probabilities numerically 0 or 1 occurred in: (if (is.empty.model(mt)) glm.fit.null else glm.fit)(x = X, y = Y, As I checked from the Archive R-Help mails, it seems that this happens when the dataset exhibits complete separation. However, p-values
2018 May 08
0
Fitting problem for Cox model with Strata as interaction term
Dear All, I got a warning message "X matrix deemed to be singular" in Cox model with a time dependent coefficient. In my analysis, the variable "SEX" is a categorical variable which violate the PH assumption in Cox. I first used the survSplit() function to break the data set into different time intervals, and then fit the model. The procedures can be described as follows:
2004 Aug 25
1
brlr function
Hi, I'm trying the brlr function in a penalized logistic regression function. However, I am not sure why I am encountering errors. I hope to seek your advice here. (output below) Thank you! Your help is truly appreciated. Min-Han #No error here, the glm seems to work fine >
2017 Jul 26
3
How long to wait for process?
UseRs, I have a dataframe with 2547 rows and several hundred columns in R 3.1.3. I am trying to run a small logistic regression with a subset of the data. know_fin ~ comp_grp2+age+gender+education+employment+income+ideol+home_lot+home+county > str(knowf3) 'data.frame': 2033 obs. of 18 variables: $ userid : Factor w/ 2542 levels
2017 Jul 27
0
How long to wait for process?
Rather than go to a penalized GLM, you might be better off investigating the sources of quasi-perfect separation and simplifying the model to avoid or reduce it. In your data set you have several factors with large number of levels, making the data sparse for all their combinations. Like multicolinearity, near perfect separation is a data problem, and is often better solved by careful
2017 Jul 27
2
How long to wait for process?
Michael, Thank you for the suggestion. I will take your advice and look more critically at the covariates. John On 7/27/2017 8:08 AM, Michael Friendly wrote: > Rather than go to a penalized GLM, you might be better off > investigating the sources of quasi-perfect separation and simplifying > the model to avoid or reduce it. In your data set you have several > factors with large
2009 Oct 11
3
Error in family$family : $ operator is invalid for atomic vectors
Dear List, I'm having problem with an exercise from The R book (M.J. Crawley) on page 567. Here is the entire code upto the point where I get an error. data(UCBAdmissions) x <- aperm(UCBAdmissions, c(2, 1, 3)) names(dimnames(x)) <- c("Sex", "Admit?", "Department") ftable(x) fourfoldplot(x, margin = 2) dept<-gl(6,4) sex<-gl(2,1,24)
2004 Oct 07
3
Remove Indeterminate Level
Hi, I have imported some data to R from stata and my factor variables have an Indeterminate level which I don't really want. For example the variable sex has the levels Male, Female and Indeterminate. There are no 'Indeterminate' values in the data. Can somebody tell me how to get rid of this level as it restricting my cox ph model. Thanks Neil
2007 Mar 26
1
Problem in loading all packages all at once
Hi All Please see the Rprofile file which i have modified as follows and after that when I start R then I see that R says to me "TRUE" for all the packages implying that all loaded at once. But when i try to use commands as simple as help("lm"), it doesnt work nor any of the menu "Packages" is not working. Although the regression using lm ( Y ~ X ) is working
2017 Jul 27
0
How long to wait for process?
Hi, Late to the thread here, but I noted that your dependent variable 'know_fin' has 3 levels in the str() output below. Since you did not provide a full c&p of your glm() call, we can only presume that you did specify 'family = binomial' in the call. Is the dataset 'knowf3' the result of a subsetting operation, such that there are only two of the three levels of