Displaying 20 results from an estimated 10000 matches similar to: "What is the SAS equivalent of this R glm() code?"
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]]
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
2009 Feb 13
1
equivalent to SAS genmod code in R?
Hello,
I have to run a general linear mixed model which looks at 2 dependent
variables at the same time (var1 divided by var2). I have tryed to search
for such a kind of model structure but since I just started using R my
search was not successful. Especielly since I only have an old SAS GENMOD
code structure from my project supervisor as an indication.
My question is no, does there exist a code
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
2006 Aug 21
2
Finney's fiducial confidence intervals of LD50
I am working with Probit regression (I cannot switch to logit) can anybody help me in finding out how to obtain with R Finney's fiducial confidence intervals for the levels of the predictor (Dose) needed to produce a proportion of 50% of responses(LD50, ED50 etc.)? 
  If the Pearson chi-square goodness-of-fit test is significant (by default), a heterogeneity factor should be used to calculate
2012 Jun 04
1
probit analysis
 Hello!
> I have a very simple set of data and I would like to analyze
> them with probit analysis.
> The data are: X    Event    Trial
> 1210  8        8
> 121  6        8
> 60.5  6        8
> I want to estimate the value of X that will give a 95% hit
> rate (Event/Trial) and the corresponding 95% CI.
> you can help me? Thanks!!
> Trinh 
	[[alternative HTML version
2006 Aug 21
1
Fwd: Re: Finney's fiducial confidence intervals of LD50
thanks a lot Renaud. 
  but i was interested in Finney's fiducial confidence intervals of LD50 so to obtain comparable results with SPSS. 
   
  But your reply leads me to the next question: does anybody know what is the best method (asymptotic,  bootstrap etc.) for calculating confidence intervals of LD50? 
   
  i could "get rid" of Finney's fiducial confidence intervals but
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
2011 Jan 28
2
help with S4 objects: trying to use a "link-glm" as a class in an object definition
Hi,
I'm trying to make a new S4 object with a slot for a "link-glm" object. R doesn't like me have a slot of class "link-glm"
> class(make.link("probit"))
[1] "link-glm"
> setClass("a",representation(item="link-glm"))
[1] "a"
Warning message:
undefined slot classes in definition of "a": item(class
2010 Dec 30
1
Different results in glm() probit model using vector vs. two-column matrix response
Hi - I am fitting a probit model using glm(), and the deviance and residual degrees of freedom are different depending on whether I use a binary response vector of length 80 or a two-column matrix response (10 rows) with the number of success and failures in each column. I would think that these would be just two different ways of specifying the same model, but this does not appear to be the case.
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:
             
2011 Feb 27
1
stata.get labels glm()
Dear R community,
I would like to import data saved with Stata and then run a Probit model using R.
My data comes from the World Values Surveys and in the Probit model I want to control for countries.
So far I figured out that I should put "convert.factors = FALSE" when using stata.get() in order to import numeric values instead of label mappings, which is what I want for most of the
2012 Oct 22
1
glm.nb - theta, dispersion, and errors
I am running 9 negative binomial regressions with count data.
The nine models use 9 different dependent variables - items of a clinical
screening instrument - and use the same set of 5 predictors. Goal is to
find out whether these predictors have differential effects on the items.
Due to various reasons, one being that I want to avoid overfitting models,
I need to employ identical types of
2008 Jan 03
1
GLM results different from GAM results without smoothing terms
Hi, I am fitting two models, a generalized linear model and a generalized
additive model, to the same data. The R-Help tells that "A generalized
additive model (GAM) is a generalized linear model (GLM) in which the linear
predictor is given by a user specified sum of smooth functions of the
covariates plus a conventional parametric component of the linear
predictor." I am fitting the GAM
2012 Sep 21
1
translating SAS proc mixed into R lme()
Dear R users,
I need  help with translating these SAS codes into R with lme()? I have a
longitudinal data with repeated measures (measurements are equally spaced
in time, subjects are measured several times a year). I need to allow slope
and intercept vary.
SAS codes are:
proc mixed data = survey method=reml;
class  subject var1 var3 var2 time;
model score = var2 score_base var4 var5 var3
2010 Jul 29
1
R Equivalent of SAS Datastep Line-Hold (@@) Specifier?
Hello Everyone,
 
Below is some SAS code that uses a "line hold specifier" to read multiple observations from each of several input lines of data. There are 3 patients per line in the in-stream data.
 
Is there a way in R to read this kind of data? I've looked in my books and online but haven't found anything
 
Thanks,
 
Paul
 
 
DATA EXAMP.TRIAL;
INPUT TRT $ CENTER PAT SEX $ AGE
2010 Jan 22
2
Stata and R user GLM method
Hello people,
I am in the process of migrating from Stata to R and I would like to check
if my results are similar under the two softwares:
Here is my GLM command under R
nurse.model<-glm(pQSfteHT~dQSvacrateHTQuali3_2 + dQSvacrateHTQuali3_3 +
dQSvacrateHTQuali3_4 + dQSvacrateHTQuali3_5 + cluster_32 + cluster_33 +
cluster_34 ,family=binomial(link = "logit"))
and below the stata
2006 Aug 17
1
Setting contrasts for polr() to get same result of SAS
Hi all,
I am trying to do a ordered probit regression using polr(), replicating a
result from SAS.
>polr(y ~ x, dat, method='probit')
suppose the model is y ~ x, where y is a factor with 3 levels and x is a
factor with 5 levels,
To get coefficients, SAS by default use the last level as reference, R by
default use the first level (correct me if I was wrong),
The result I got is a
2010 Apr 09
2
computation of dispersion parameter in quasi-poisson glm
Hi list,
can anybody point me to the trick how glm is computing the dispersion
parameter in quasi-poisson regression, eg.
glm(...,family="quasipoisson")?
Thanks ®ards, Sven