similar to: Comparing Negative Binomial Regression in Stata and R. Constants differ?

Displaying 17 results from an estimated 17 matches similar to: "Comparing Negative Binomial Regression in Stata and R. Constants differ?"

2007 Mar 08
1
how to assign fixed factor in lm
Hi there, > Value=c(709,679,699,657,594,677,592,538,476,508,505,539) > Lard=rep(c("Fresh","Rancid"),each=6) > Gender=rep(c("Male","Male","Male","Female","Female","Female"),2) > Food=data.frame(Value,Lard,Gender) > Food Value Lard Gender 1 709 Fresh Male 2 679 Fresh Male 3 699 Fresh
2010 Aug 03
2
Specifying interactions in rms package... error
I am encountering an error I do not know how to debug. The error arises when I try to add an interaction term involving two continuous variables (defined using rcs functions) to an existing (and working) model. The new model reads: model5 <- lrm( B_fainting ~ gender+ rcs(exactage, 7) + rcs(DW_nadler_bv, 7) + rcs(drawtimefrom8am, 7)+ DW_firsttime+ DW_race_eth +
2008 May 04
2
Ancova_non-normality of errors
Hello Helpers, I have some problems with fitting the model for my data... -->my Literatur says (crawley testbook)= Non-normality of errors-->I get a banana shape Q-Q plot with opening of banana downwards Structure of data: origin wt pes gender 1 wild 5.35 147.0 male 2 wild 5.90 148.0 male 3 wild 6.00 156.0 male 4 wild 7.50 157.0 male 5 wild 5.90
2008 Nov 11
1
using newdata in survfit with categorical variable
Hi R-helpers, I was trying to put gender='Male' in newdata to create a expected survival curve for a pseudo cohort by using survfit based on Cox regression. My codes are shown below: fit<- coxph(Surv(end, status2)~gender, data=wlwsn1) Summary(fit) coef exp(coef) se(coef) z p genderMale 0.204 1.23 0.0912 2.23 0.025
2008 Mar 13
1
strange results from binomial lmer?
I'm running lmer repeatedly on artificial data with two fixed factors (called 'gender' and 'stress') and one random factor ('speaker'). Gender is a between-speaker variable, stress is a within-speaker variable, if that matters. Each dataset has 100 rows from each of 20 speakers, 2000 rows in all. About 5% of the time I get a strange result, where the lmer() model with
2007 Oct 16
2
username with @ (at character) - problems with authentication (CUPS)
Hi all I tried to set up a printer, which I need to acces using my username. Unfortunatelly, username contains @ (at) inside. I tried different form of escaping (using backslash, unicode value, quotes etc). Nothing works. my username is: abc@domain.com my password is: 12345678 printer server is: srv-file printer name (with space): KyC2520 WITS From various docs i found the URI form I
2007 Aug 29
2
kinit works, net join ads fails
I running 3.0.25c on OpenSolaris. I can succesfully do a kinit and see the ticket via klist, but am unable to join the domain. /usr/sfw/sbin/net -d 5 ads join -U user@DOMAIN.LOCAL gives the following error... [2007/08/29 15:49:24, 3] libsmb/clikrb5.c:(593) ads_krb5_mk_req: krb5_cc_get_principal failed (No credentials cache file found) [2007/08/29 15:49:24, 0] libads/kerberos.c:(228)
2009 Jul 12
0
ERROR message while using <-invMillsRatio()
Hi I have been trying so many different things to get my Inverse Mills Ratio going for a Two stage Heckman Model, I have tried the following so far (the commands are listed below till teh point where I get an error), I get an error in the last sentence (marked in bold below), if this were successful then I could have used the IMR as a control in my OLS (which would be the OLS for the outcome
2011 Dec 19
2
summary vs anova
Hi, I'm sure this is simple, but I haven't been able to find this in TFM, say I have some data in R like this (pasted here: http://pastebin.com/raw.php?i=sjS9Zkup): > head(df) gender age smokes disease Y 1 female 65 ever control 0.18 2 female 77 never control 0.12 3 male 40 state1 0.11 4 female 67 ever control 0.20 5 male 63 ever state1 0.16
2012 Dec 10
3
Warning message: In eval(expr, envir, enclos) : non-integer #successes in a binomial glm!
Hi there I'm trying to fit a logistic regression model to data that looks very similar to the data in the sample below. I don't understand why I'm getting this error; none of the data are proportional and the weights are numeric values. Should I be concerned about the warning about non-integer successes in my binomial glm? If I should be, how do I go about addressing it? I'm
2006 Jun 04
1
Nested and repeated effects together?
Dear R people, I am having a problem with modeling the following SAS code in R: Class ID Gr Hemi Region Gender Model Y = Gr Region Hemi Gender Gr*Hemi Gr*Region Hemi*Region Gender*Region Gender*Hemi Gr*Hemi*Region Gender*Hemi*Region Gr*Gender*Hemi*Region Random Intercept Region Hemi /Subject = ID (Gr Gender) I.e., ID is a random effect nested in Gr and Gender, leading to ID-specific
2007 Feb 24
1
Woolf's test, Odds ratio, stratification
Just a general question concerning the woolf test (package vcd), when we have stratified data (2x2 tables) and when the p.value of the woolf-test is below 0.05 then we assume that there is a heterogeneity and a common odds ratio cannot be computed? Does this mean that we have to try to add more stratification variables (stratify more) to make the woolf-test p.value insignificant? Also in the
2008 Jul 19
0
fixed effect significance with lmer() vs. t-test
I am looking at data of the following structure: n <- 100 dataset <- data.frame(gender=NULL,subject=NULL,outcome=NULL) for (i in 1:n){ gender <- c(rep("m",5),rep("f",5)) subject <- letters[1:10] outcome <- c(rbinom(5,1,0.6),rbinom(5,1,0.4)) dataset <- rbind(dataset,cbind(gender,subject,outcome))} I am interested in the significance of
2009 Feb 09
0
problems with lm for nested fixed-factor Anova
Dear R users, I want to run nested fixed-factor Anova in R on different experiments. In this toy example I have 3 levels of the main factor x1 and 7 levels of the nested factor z1 x1 and continuous response variable y1. x1 [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 [38] 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 [75] 3 3 3
2008 Feb 23
1
clarification about glm
Hello, I have a question about glm: if i have a binary covariate (unit=1,0) the reference group would be 0? (prediction for unit=1) example: dat1<-data.frame(y,unit,x1,x2) log_u <- glm(y~.,family=binomial,data=dat1) summary(log_u) Estimate Std. Error z value Pr(>|z|) (Intercept) -0.54247 0.24658 -2.200 0.0278 * unit1 -0.13052 0.22861 -0.571 0.5680 aps
2007 Feb 19
1
random effect nested within fixed effects (binomial lmer)
I have a large dataset where each Subject answered seven similar Items, which are binary yes/no questions. So I've always used Subject and Item random effects in my models, fit with lmer(), e.g.: model<-lmer(Response~Race+Gender+...+(1|Subject_ID)+(1| Item_ID),data,binomial) But I recently realized something. Most of the variables that I've tested as fixed effects are properties
2009 Feb 12
2
repost: problems with lm for nested fixed-factor Anova (ANOVA I)
Dear R users, I have posted this question several days ago and received not a single suggestion. I believe I have provided sufficient information for at least some help. Here I repost the question with several modifications. I want to run nested fixed-factor Anova in R on different experiments. I have 48 levels of the main factor x1 and 242 levels of the nested factor z1, and continuous response