Displaying 20 results from an estimated 200 matches similar to: "equivalent to SAS genmod code in R?"
2008 Sep 09
1
Genmod in SAS vs. glm in R
Hello,
I have different results from these two softwares for a simple binomial GLM
problem.
>From Genmod in SAS: LogLikelihood=-4.75, coeff(intercept)=-3.59,
coeff(x)=0.95
>From glm in R: LogLikelihood=-0.94, coeff(intercept)=-3.99, coeff(x)=1.36
Is there anyone tell me what I did wrong?
Here are the code and results,
1) SAS Genmod:
% r: # of failure
% k: size of a risk set
data
2007 Mar 19
1
likelihoods in SAS GENMOD vs R glm
List: I'm helping a colleague with some Poisson regression modeling. He
uses SAS proc GENMOD and I'm using glm() in R. Note on the SAS and R
output below that our estimates, standard errors, and deviances are
identical but what we get for likelihoods differs considerably. I'm
assuming that these must differ just by some constant but it would be nice
to have some confirmation
2005 Apr 04
1
R package that has (much) the same capabilities as SAS v9 PROC GENMOD
I need capabilities, for my data analysis, like the Pinheiro & Bates
S-Plus/R package nlme() but with binomial family and logit link.
I need multiple crossed, possibly interacting fixed effects (age cohort of
twin when entered study, sex of twin, sampling method used to acquire twin
pair, and twin zygosity), a couple of random effects other than the cluster
variable, and the ability to
2007 Feb 02
1
Fitting Weighted Estimating Equations
Hello Everybody:
I am searching for an R package for fitting Generalized Estimating Equations (GEE) with weights (i.e. Weighted Estimating Equations). From the R documentation I found "geese(geepack)" for fitting Generalized Estimating Equations. In this documentation, under the paragraph “weights” it has been written, “an optional vector of weights to be used in the fitting process.
2008 Jul 28
1
Negative Binomial Regression
Hello.
I am attempting to duplicate a negative binomial regression in R. SAS uses
generalized estimating equations for model fitting in the GENMOD procedure.
proc genmod data=mydata (where=(gender='F'));
by agegroup;
class id gender type;
model count = var1 var2 var3 /dist=NB link=log offset=lregtm;
repeated subject=id /type=exch;
run;
Since my dataset has several observations for
2002 Sep 23
0
arima() in package ts.
I've been trying to get comfy with arima() and associated functions
in the ts() package. I'm thinking seriously about using this
package, and R generally, in a 4th year intro time series course that
I'm teaching this autumn.
I have a couple of questions about arima:
(1) The help file says that residuals component of the value returned
by arima() consists of the
2004 Mar 24
2
GLMM
Dear all,
I'm working with count data following over-dispersed poisson distribution
and have to work with mixed-models on them (like proc GENMOD on SAS sys.).
I'm still not to sure about what function to use. It seems to me that a
glmmPQL will do the job I want, but I'll be glad if people who worked on
this type of data can share what they learned. Thanks for your time.
simon
2010 Jan 28
2
SAS Type 1 / Type 3 Analysis Equivalent.
Hi All,
I'm using glm() in R to perform Poisson regression, I'm wondering if its
possible to get equivalent Type 1 / Type 3 Analysis (similar to one in PROC
GENMOD).
Thanks,
Kim
[[alternative HTML version deleted]]
2001 Mar 21
2
LR-based CIs for GLMs
We are using glm() to models to counts of deaths due to rare causes using a log link and Poisson error distribution, with population as the offset. Approximate confidence intervals for the parameter estimates are easy to calculate using a standard normal deviate, but obviously when the counts of deaths are small (which is why we are using Poisson regression), these intervals are very approximate
2004 Jul 20
5
Precision in R
Greetings.
I'm trying to recreate in R some regression models I've done in SAS,
but I'm not getting the same results. My advisor suspects this may be
due to differences in precision between R and SAS. Does anyone know
where I can find specifications for R's type double? (It doesn't seem
to be in the R Language Definition.) Thanks in advance for any help
anyone can
2006 Jun 16
6
modeling logit(y/n) using lrm
I have a dataset at a hospital level (as opposed to the patient level)
that contains number of patients experiencing events (call this number
y), and the number of patients eligible for such events (call this
number n). I am trying to model logit(y/n) = XBeta. In SAS this can be
done in PROC LOGISTIC or GENMOD with a model statement such as: model
y/n = <predictors>;. Can this be done
2005 Mar 03
1
Negative binomial regression for count data
Dear list,
I would like to fit a negative binomial regression model as described in "Byers AL, Allore H, Gill TM, Peduzzi PN., Application of negative binomial modeling for discrete outcomes: a case study in aging research. J Clin Epidemiol. 2003 Jun;56(6):559-64" to my data in which the response is count data. There are also 10 predictors that are count data, and I have also 3
2010 Dec 03
2
What is the SAS equivalent of this R glm() code?
Hello Everyone,
I'm trying to use SAS to replicate some results obtained in R. I was wondering if anyone call tell me the SAS equivalent of the code that appears below.
fm.glm.x <- glm(resp ~ . - 1, data = as.data.frame(mm.x),
na.action = na.exclude, family = binomial(link = "probit"))
summary(fm.glm.x)
Thanks,
Paul
[[alternative HTML version deleted]]
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 Jul 04
0
who can explain the difference between the R and SAS on the results of GLM
Dear friends,
I used R and SAS to analyze my data through generalized linear model, and
there is some difference between them.
Results from R:
glm(formula = snail ~ grass + gheight + humidity + altitude + soiltemr +
airtemr, family = Gamma)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.23873 -0.41123 -0.08703 0.24339 1.21435
Coefficients:
2005 Feb 07
2
questions sur R
bonjour,
Je suis actuellement en derniere annee d'ecole d'ingenieur en informatique et statistiques et je dois réaliser mon projet de fin d'études sur le logiciel R.
En fait, je dois réaliser un scoring sous R puis le meme sous SAS et comparer les resultats. Mon fichier se prete à une regression logistique. J'ai donc utilisé la fonction glm sous R et Catmod sous SAS seumement, je
2007 Feb 08
0
How to get p-values, seperate vectors of regression coefficients and their s.e. from the "yags" output?
Hello R-users:
I am using "yags" for fitting GEE which is giving me the same result as "Proc GENMOD". Now I have couple of questions related to yags output. (By the way, someone told me to run the geeglm for the same analysis and I did run but did not get the same result as of genmod and don't know how to correct the geeglm codes so that all three will be same!)
2008 Nov 20
1
binomial glm???
Hi everyone,
newbee query!
I've installed R 2.8.0 and tried to run this simple glm -
x is no of cars in a given year, y is the number voted in an election
that year while n is the population 18+:
votes <- data.frame(x = c(0.62,0.77,0.71,0.74,0.77,0.86,1.13,1.44),
+ y=c(502,542,711,653,771,806,934,1123), n=
2000 Nov 05
3
glm
Hi to all,
So I'm also a new user. I downloaded the program last week and I think it's great. Thanks to those who have developed R.
I have a special interest in GLM as a tool to describe fisheries and its variables and I'm just begging to study it.
As I could understand there's two types of GLM sun of squares: in "type I" the factors are added in sequence and
2015 Mar 03
2
Asssistance
Hi to All,
I am building a package in R and whenever I run command "R CMD build OAR"
in the terminal, I get the following error:
* checking for file ?OAR/DESCRIPTION? ... OK
* preparing ?OAR?:
* checking DESCRIPTION meta-information ... ERROR
Malformed Depends or Suggests or Imports or Enhances field.
Offending entries:
R (>=3.0.2)
Entries must be names of packages optionally