similar to: Precision in R

Displaying 20 results from an estimated 200 matches similar to: "Precision in R"

2004 May 16
1
Newbie Poisson regression question
Greetings. I'm getting started learning R, and I'm trying to reproduce some models I've done previously in SAS. I'm trying to fit simple Poisson regressions, and I keep getting impossible results: the models predict negative numbers of cases for many observations. The code for the models are: Female.model <- glm(Observed ~ Black + Other, family = poisson(link=log),
2004 Sep 20
2
Getting the real names of variables within functions
Greetings. These days I find myself writing a lot of functions to handle routine things. One of these is a function to create a scatterplot of variables and draw a lowessed line so I can get some idea if there's any relationship between them. lowessed.plot <- function(x, y) { plot(x, y) lines(lowess(x, y)) } However, there's a slight problem: the plot axes come out labeled
2004 Nov 03
4
Newbie question: plotting regression models
Greetings. Is there any way to get R to take a regression model object and draw a plot of the regression function? How about overlaying that plot over a scatterplot of the actual data? Thanks in advance for any help anyone can provide. Aaron ----- Aaron Solomon?? (??ben Saul Joseph??) ??Adelman E-mail??: ??adelmaas at musc.edu Web site??: ??http??://??people.musc.edu??/??~adelmaas??/??
2006 Jul 04
1
Exporting tables to RTF?
Greetings. Yesterday I managed to jury-rig a system to get a table out of R and import it into Nisus Writer Express (a word processor for Mac OS X). What I came up with is brittle, since it depends on an AppleScript script which has to be in a specific location and on no one touching the computer, since the AppleScript remotely controls Nisus Writer Express rather blindly and will make
2012 Feb 06
1
appending variable's values in table like fashion
i have two variable > pyar [1] "M" "12" "34" "13" > gita [1] "U" "22" "33" "44" want to append gita object below pyar object as & want to take in anther variable "M" "12" "34" "13" "U" "22" "33" "44" & write it in
2006 Mar 30
1
Laptop freezes when trying to load R packages?
Hello I am having an R related problem and can't seem to fix it by looking at any of the online documentation. I have a laptop (using Windows XP home edition) and loaded R 2.2.1. I then designated a mirror (USA-NC). But when I try to load a package, it freezes. I have tried to close R, but it won't close; I end up having to restart the laptop. I have no problems with any other
2013 May 08
4
Correctly Setting New Seed
Could someone please suggest a method to store the current random seed. I'm having trouble understanding how to correctly use set.seed and .Random.seed. Specifically, I have the following code that crashes: set.seed(seed) for(i in 1:10){ print( runif(1)) } To get around this I need to split the number of iterations into chunks: set.seed(seed) for(i in 1:5){ print(runif(1))
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
2007 Jan 06
2
Bootstrapping Confidence Intervals for Medians
I apologize for this post. I am new to R (two days) and I have tried and tried to calculated confidence intervals for medians. Can someone help me? Here is my data: institution1 0.21 0.16 0.32 0.69 1.15 0.9 0.87 0.87 0.73 The first four observations compose group 1 and observations 5 through 9 compose group 2. I would like to create a bootstrapped 90% confidence interval on the difference of
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
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
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.
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
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
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]]
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]]
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
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
2010 Jul 09
2
Compress string memCompress/Decompress
Hello, I would like to compress a long string (character vector), store the compressed string in the text field of a SQLite database (using RSQLite), and then load the text back into memory and decompress it back into the the original string. My character vector can be compressed considerably using standard gzip/bzip2 compression. In theory it should be much faster for me to compress/decompress