this
if the example became any more complicated.
I'm unable to remember a less error prone method :). But I expect you might.
Here's my working example code
## Paul Johnson pauljohn at ku.edu
## 2013-06-07
## We need to create an ordinal factor from these indicators
## completed elementary school
es - c(0
(factor(x, levels = c(000, 100, 110, 111), labels =
c(none, es,hs, cg)))
none es hs cg
4112
Cheers,
Josh
*Drawn from comments by Judea Pearl one lively session.
On Fri, Jun 7, 2013 at 6:13 PM, Paul Johnson pauljoh...@gmail.com
wrote:
In our
I would appreciate ideas about MS Windows install issues. I'm at our stats
summer camp and have been looking at a lot of Windows R installs and there
are some wrinkles about R_LIBS_USER.
On a clean Win7 or Win8 system, with R-3.0.1, we see the user library for
packages defaulting to
Please consider using the R package systemfit. It has existed for about 10
years, I've used it many times happily :)
I've not used gmm package, I'm not criticizing it. But I have good results
from systemfit. It has good documentation.
This package contains functions for fitting
simultaneous
This will appear on CRAN mirrors soon. It's my update for Spring, 2013. I keep
track of R problems that arise in the regression course and try to facilitate
them. There are functions for describing data, presenting regression plots and
tables, some regression diagnostics.
Most of the usages are
On Thu, Jul 19, 2012 at 11:11 AM, Bert Gunter gunter.ber...@gene.com wrote:
Hadley et. al:
Indeed. And using a loop is a poor way to do it anyway.
v - as.list(rep(FALSE,dotot))
is way faster.
-- Bert
Its not entirely clear to me what we are supposed to conclude about this.
I can
packages:
[1] stats graphics grDevices utils datasets methods base
## Paul Johnson paulj...@ku.edu
## 2012-08-10
##
## I've got trouble with a mis-match between screen and pdf devices.
## Please run this and tell me if the point z's marker is on the
## intersection of the 2 circles for you
I'm making some illustrations and it would be convenient to
automatically shade the overlapping portions of circles. These
illustrations are for Social Choice theory, a field in political
science and economics. I've wrestled together some examples so you
can see what I mean, but have not
words here.
I've built a toy example that will illustrate the problem, you tell me
the words for it.
## Paul Johnson 2014-04-10
dat - data.frame(x = rnorm(50),y = rnorm(50))
m1 - lm(y ~ x, dat)
myRegFit - function(model, nd) predict(model, nd)
mySpecialFeature - function(model, ci){
pargs
2011/2/5 Sebastián Daza sebastian.d...@gmail.com:
Hi everyone,
I need to get a between-component variance (e.g. random effects Anova), but
using lmer I don't get the same results (variance component) than using
random effects Anova. I am using a database of students, clustered on
schools
On Sat, Feb 5, 2011 at 9:19 AM, David Winsemius dwinsem...@comcast.net wrote:
On Feb 4, 2011, at 7:06 PM, Gong-Yi Liao wrote:
Dear list:
I have tried MASS's mca function and SAS's PROC corresp on the
farms data (included in MASS, also used as mca's example), the
results are different:
Hello!
On Thu, Feb 3, 2011 at 6:27 AM, m234 mhairialexan...@gmail.com wrote:
II functional response for 2 data sets:
nls(eaten~(a*suppl)/(1+a*h*suppl)
where eaten is the number of prey eaten by a predator and suppl is the
number of prey initially supplied to the same predator.
I have
Here's my little discussion example for a quadratic regression:
http://pj.freefaculty.org/R/WorkingExamples/regression-quadratic-1.R
Students press me to know the benefits of poly() over the more obvious
regression formulas.
I think I understand the theory on why poly() should be more
On Mon, Apr 1, 2013 at 12:42 PM, Gabor Grothendieck ggrothendi...@gmail.com
wrote:
On Mon, Apr 1, 2013 at 1:20 PM, Paul Johnson pauljoh...@gmail.com wrote:
Here's my little discussion example for a quadratic regression:
http://pj.freefaculty.org/R/WorkingExamples/regression-quadratic-1.R
On Apr 1, 2013 1:10 AM, qi A send2...@gmail.com wrote:
Hi, All
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear
regression, does R offer this option for nonlinear regression?
I have read the helpfile for nls() and could not find such option, any
suggestion?
nelder-mead
On Thu, Apr 4, 2013 at 4:39 AM, Shane Carey careys...@gmail.com wrote:
Hi William,
for (i in one:length(DATA_names))
if ((grepl(_,DATA_names[i]))==TRUE)
DATA_names[i]-f(DATA_names[i]))
I keep getting an error saying: incompatible types (from symbol to
character) in subassignment
Hi
On Thu, Apr 11, 2013 at 6:43 AM, Simza alex_steckba...@gmx.at wrote:
Helo everybody,
I'm new to R and have some issues with my data in R.
My raw data look like that:
ID Day size 1 1 7 1 1 7.2 1 1 7.1 2 1 7.3 2 1 7.4 2 1 7.2 3 1 7 3 1 7.1 3 1
7.5 4 1 7.3 4 1 7.2 4 1 7.6 1 2 7 1 2 7.2 1 2
Greetings.
I'm teaching linear regression this semester and that means I write
more functions for my regression support package rockchalk. I'm at
a point now were some fresh eyes would help, so if you are a student
in a course on regression, please consider looking over my package
overview
On Wed, Apr 24, 2013 at 3:11 AM, alfonso.carf...@uniparthenope.it wrote:
I'm using the package pglm and I'have estimated a random probit model.
I need to save in a vector the fitted values and the residuals of the model
but I can not do it.
I tried with the command fitted.values using the
On Wed, Apr 24, 2013 at 4:37 PM, Achim Zeileis achim.zeil...@uibk.ac.at wrote:
On Wed, 24 Apr 2013, Paul Johnson wrote:
On Wed, Apr 24, 2013 at 3:11 AM, alfonso.carf...@uniparthenope.it
wrote:
I'm using the package pglm and I'have estimated a random probit model.
I need to save in a vector
Greetings to r-help land.
I've run into some program crashes and I've traced them back to methods()
behavior
after the package gdata is loaded. I provide now a minimal re-producible
example. This seems bugish to me. How about you?
dat - data.frame(x = rnorm(100), y = rnorm(100))
lm1 - lm(y ~ x,
It is easy to construct your own test. I test against null of 0 first so I
can be sure I match the right result from summary.lm.
## get the standard error
seofb - sqrt(diag(vcov(lm1)))
## calculate t. Replace 0 by your null
myt - (coef(lm1) - 0)/seofb
mypval - 2*pt(abs(myt), lower.tail = FALSE,
This is a feature request. Or else a howto request. Can there be some
simple, automatic way to make fonts embed into pdf output? Could this be in
options() or par()?
Why?
I recently wanted to create a paper for a conference in a format called
AAAI (which I had never heard of before because I
Meenu:
You have an elementary Linux setup and configuration problem to understand
first, before you worry about configuring and compiling your own R. I
agree strongly that this is something that all linux users should learn to
do, but compiling R itself is like climbing Mt Everest as your first
Greetings:
rockchalk is a collection of functions to facilitate presentation of regression
models.
It includes some functions that I have been circulating for quite some time
(such as
outreg) as well as several others. The main aim is to allow people who do not
understand very much R to survive
and
let me know how its use could be enhanced, or what other features you
might want.
I know folks are busy, so to save you the trouble of actually running
the code, I also paste in a session demonstrating one run through.
Here's the code:
##Paul Johnson
## 2012-04-20
## Facilitate creation
On Fri, Apr 20, 2012 at 2:18 PM, Jonathan Greenberg j...@illinois.edu wrote:
Ok, I figured out a solution and I'd like to get some feedback on this from
the R-helpers as to how I could modify the following to be package
friendly -- the main thing I'm worried about is how to dynamically set the
I set up a local repo for testing packages. My packages are not
showing up from the repository when viewed by Linux clients. I suspect
this is a web administrator/firewall issue, but it could be I created
the repo wrongly. I am supposed to run write_PACKAGES separately in
each R-version folder.
On Tue, May 8, 2012 at 5:16 PM, rbuxton moy...@hotmail.com wrote:
http://r.789695.n4.nabble.com/file/n4618871/Data_for_list_serve.csv
Data_for_list_serve.csv
Here is my data, hope this helps.
The LESP CHUCKLE , FTSP FLIGHT, and ANMU CHIRRUP are the dependent
variables, I want to run one
On Tue, May 8, 2012 at 3:45 PM, array chip arrayprof...@yahoo.com wrote:
Thanks again Peter. What about the argument that because low R square (e.g.
R^2=0.2) indicated the model variance was not sufficiently explained by the
factors in the model, there might be additional factors that should
On Tue, May 8, 2012 at 9:06 PM, rbuxton moy...@hotmail.com wrote:
Update!
I changed the site categories. I noticed that I had coded them as
North,
South, East, West on different islands, which may have caused confusion in
the model.
[...]
mod - glmmadmb(LESP.CHUCKLE~ 1+(1|ISLAND),
This is a basic Windows system administrator problem, asked by a Linux
guy who is helping out in a Windows lab.
I want to keep R packages up to date on MS Windows 7 with a job in the
Task Scheduler. I have an R program that I can run (as
administrator) that updates the existing packages and then
On Sat, May 19, 2012 at 11:07 AM, William Dunlap wdun...@tibco.com wrote:
parse(text=paste(...)) works in simple cases but not in others. The
fortune about it is there because it is tempting to use but if you bury it
in a general purpose function it will cause problems when people
start using
Greetings R-help!
In case anybody has worked on an old Redhat system lately, can you
remember what is the cause of this problem? I don't think this is a
fatal problem, because I can get around it by uninstalling all of the
R RPM packages and re-running the build. But if R is installed, the
build
Dear Emiliano:
When they say to read the posting guide, mostly they mean read the
posting guide. But I'll tell you the short version.
1. Include a full runable R program that causes the trouble you are
concerned about. Include the data or a link to the data, usually the
smallest possible
In the rockchalk package, I want to provide functions for regression
objects that are "well behaved." If an object responds to the methods
that lm or glm objects can handle, like coef(), nobs(), and summary(),
I want to be able to handle the same thing.
It is more difficult than expected to ask a
In Centos 7 systems, I wrote a script that runs on the cron and I
notice some package updates and installs fail like this:
Error : .onLoad failed in loadNamespace() for 'iplots', details:
call: .jnew("org/rosuda/iplots/Framework")
error: java.awt.HeadlessException:
No X11 DISPLAY variable
On Wed, Oct 19, 2016 at 10:31 AM, David Winsemius
wrote:
>
>> On Oct 19, 2016, at 4:54 AM, Kevin E. Thorpe
>> wrote:
>>
>> Hello.
>>
>> I am posting this on behalf of one of my students who is getting error
>> messages when installing some
Hello, R friends
My student unearthed this quirk that might interest you.
I wondered if this might be a bug in the R interpreter. If not a bug,
it certainly stands as a good example of the dangers of floating point
numbers in computing.
What do you think?
> 100*(23/40)
[1] 57.5
> (100*23)/40
I have done this a lot. Would you mind installing my pkg rockchalk and then
run example(plotSlope) and example(plotCurve)? If the output is close to
what you want, you can adjust my code. The vignette explains.
1. Create newdata object
2. Run that through predict
3. Make plot
None of this is
ting floats.
I wonder now if all uses of > or < with numeric variables are suspect.
Oh well. If everybody posts their advice, I will write a summary.
Paul Johnson
University of Kansas
On Apr 21, 2017 12:02 AM, "PIKAL Petr" <petr.pi...@precheza.cz> wrote:
> Hi
&g
I dont understand your code. But I do have suggestion. Run the functions in
the profiler, maybe differences will point at the enemy.
Know what I mean?
Rprof('check.out')
#run code
Rprof(NULL)
summaryRprof('check.out')
Do that for each method. That may be uninformative.
I wondered if you tried
rt is right. I have to read more books.
I studied Golub and van Loan and came away with healthy fear of matrix
inversion. But when you look at user contributed regression packages, what
do you find? Matrix inversion and lots of X'X.
Paul Johnson
University of Kansask
The key (in your example)
This is for the problem I posted about last Friday.
First, the happy part, a workaround:
$ cd ~/R/x86_64-redhat-linux-gnu-library/3.4
$ ln -sf /usr/share/R/library/* .
After that, all of the packages are found by R CMD check. R CMD check
looks in the ~/R/x86_64-redhat-linux-gnu-library/3.4
Dear everybody:
Packages that DO pass the package check on my Ubuntu 17.04 laptop with
R 3.4.1 and Mac OSX do not build on Centos 7 with R 3.4.1. I'm pretty
sure I have an environment defect, but cannot find it.
I find posts from various people about this problem since 2012. But
I've checked
On Aug 12, 2017 11:58 AM, "José Abílio Matos" <jaoma...@gmail.com> wrote:
On Friday, 11 August 2017 22.51.12 WEST Paul Johnson wrote:
> Dear everybody:
>
> Packages that DO pass the package check on my Ubuntu 17.04 laptop with
> R 3.4.1 and Mac OSX do not build o
In the rockchalk package, I have a function called newdata that will help
with this. Plenty of examples. Probably my predictOmatic function will just
work. Motivation is in the vignette.
Paul Johnson
University of Kansas
On Aug 9, 2017 11:23 AM, "Alina Vodonos Zilberg" <alina.vodo
On Wednesday, August 16, 2017, AbouEl-Makarim Aboueissa <
abouelmakarim1...@gmail.com> wrote:
> Dear All:
>
> I am trying to install the package "diagram". It is in the list. But when I
> selected the package to install it, it says:
>
> Question: "would you like to use a personal library
We have a project that calls for the creation of a list of many
distribution objects. Distributions can be of various types, with
various parameters, but we ran into some problems. I started testing
on a simple list of rnorm-based objects.
I was a little surprised at the RAM storage
If Emacs is not asking for starting directory, it is very likely your
init file has this somewhere:
(setq ess-ask-for-ess-directory nil)
On Mon, Sep 11, 2017 at 3:23 PM, Enrico Schumann
wrote:
> On Mon, 11 Sep 2017, Christian writes:
>
>> Hi,
>>
>> I experienced a
Can you point me at any packages that allow users to write a
formula with coefficients?
I want to write a data simulator that has a matrix X with lots
of columns, and then users can generate predictive models
by entering a formula that uses some of the variables, allowing
interactions, like
y ~
On Mon, Aug 20, 2018 at 2:17 PM David Doyle wrote:
>
> Hello everyone,
>
> I'm trying to generate tables of my data out of R for my report.
>
> My data is setup in the format as follows and the example can be found at:
> http://doylesdartden.com/R/ExampleData.csv
>
> LocationDate
Long ago, when R's t.test had var.equal=TRUE by default, I wrote some
class notes showing that the result was equivalent to a one predictor
regression model. Because t.test does not default to var.equal=TRUE
these days, I'm curious to know if there is a way to specify weights
in an lm to obtain
lm.beta, it actually standardizes variables and runs regression. lm.beta
resales coefficients instead.
Paul Johnson
University of Kansas
On Wed, Sep 26, 2018, 5:03 AM CHATTON Anne via R-help
wrote:
> Dear all,
>
> I am having problems in obtaining standardized betas on a multiply-imput
t post hoc comparisons.
In car package, Anova function will help. I may teach Anova soon, we'll see
if I have better answer then.
Paul Johnson
University of Kansas
On Wed, Oct 10, 2018, 1:14 AM Thanh Tran wrote:
> Hi eveyone,
> I'm studying about variance (ANOVA) in R and have some questio
Thanks, everybody. I'm taking the suggestion Martin offered, since
this thing is required to be named *.txt in the current OpenBUGS.
Solution
Put this at the end of the *.txt file:
# Local Variables:
# mode: R
# End:
That works.
This question was raised by an interesting problem. This might
Do you notice this:
cd into a folder, say "~/tmp/project/R" and start emacs with a file in
there. The working directory correctly shows "~/tmp/project/R".
Then launch an R session. When you quit the R session, and start a new
R session, the working directory changed, it becomes "~/tmp/project".
of the markdown-style commentary?
>
>
Here is an R file that has "Rstudio sections" that begin with #. I just tested
with their gui and the magic recipe for howto is written below. It is
something like
Emacs org mode, I suppose. Code folding. This is an example of a
file that
Greetings.
I want to have ESS know the working directory from shell pwd, I don't
want it to ask me.
I have a setting in my init.el that used to work that way:
;; start R in current working directory, don't let R ask user:
(setq ess-ask-for-ess-directory nil)
Recently, it has stopped working.
sets the default
>> directory to the package directory. It looks like it treats your tmp
>> directory
>> as a package. @Lionel?
>>
>> Vitalie
>>
>>>> On Thu, Nov 30 2017 18:59, Paul Johnson wrote:
>>
>>> Greetings.
>>
>>> I
If Emacs is not asking for starting directory, it is very likely your
init file has this somewhere:
(setq ess-ask-for-ess-directory nil)
On Mon, Sep 11, 2017 at 3:23 PM, Enrico Schumann
wrote:
> On Mon, 11 Sep 2017, Christian writes:
>
>> Hi,
>>
>> I experienced a
I wonder if I've got polymode set up correctly. I have Ubuntu 17.10
Emacs 25.2 Ess 17.11, it works well to edit R files. Today I installed
polymode from melpa,
When I open an Rmd file, I can visually see a difference. The code
chunks are likely shaded areas. Also, some keywords within the R
t a polymode problem. I just don't like
markdown-mode so much.
If anybody has tips for working with Rmd files, I'm all ears at this point.
Best
pj
> Best,
> Ista
>
> On Tue, Feb 6, 2018 at 11:24 AM, Paul Johnson <pauljoh...@gmail.com> wrote:
>> I wonder if I've got polymod
I'm running Ubuntu-18.10 and the new packaging for elpa-ess provides
ESS 18.10. I still like CUA mode rectangles and so I want to remap
C-RET to S-RET.
5 years ago Vitalie S told me how to do that. The stanza in init.el was:
;; Change shortcut "run this line" to use Shift-Return
;; Suggested by
till discussing the change. For now
> just replace "ess-mode" with "ess" and it should be fine. The change to
> *-visibility-* is needed.
>
> In the future release both ess-mode and ess will work.
>
>
> Vitalie
>
> >> On Wed, Oct 24 2018 14
In functions with roxygen examples, until very recently I could run the
examples even though they had the roxygen comment "##'" at the beginning.
Emacs/ESS would, literally, let me do "next" over and over again to run
example code.
Today I realize that does not happen anymore, Emacs/ESS is
On Wed, Jan 30, 2019 at 4:37 PM Alex Branham wrote:
>
> On Wed 30 Jan 2019 at 12:34, Paul Johnson via ESS-help <
> ess-help@r-project.org> wrote:
>
> > In functions with roxygen examples, until very recently I could run the
> > examples even thoug
On Mon, Feb 4, 2019 at 9:22 AM Alex Branham wrote:
>
> > In my init file I have S-RET as the replacement for C-RET, but I've
> tested
> > this both ways and get same behavior. After removing the init file,
> when I
> > do C-RET, then the one line I'm on will run, but the focus jumps over the
>
confidence interval bound
##' @param arrow.width Arrowhead length must be specified in inches. See
?arrows
##' @param width Thickness of shaded column
##' @param col Color for a bar
##' @param opacity 120 is default, that's partial see through.
##' @return NONE
##' @export
##' @author Paul Johnson
101 - 169 of 169 matches
Mail list logo