compact sequences are actually an ALTREP object. I do not know if there is
any standard way to do it, but here is a trick for what you want.
```
> x <- 1:3
> .Internal(inspect(x))
@0x0196bed8dd78 13 INTSXP g0c0 [NAM(7)] 1 : 3 (compact)
> x[1] <- x[1]
> .Internal(inspect(x))
@0x0196bef90b6
On Sat, 29 Aug 2020 21:15:56 +
"Sorkin, John" wrote:
> I am trying to find the minimum of a linear function:
Quadratic function???
> y <- (-0.0263*b) + (0.0010*B^2)
>
> I am having GREAT difficulty with the documentation of the deriv
> function. I have (after playing for two-hours) been
I read the help page, I don't understand it very well, since I set the
environmental variable TMPDIR in .Renviron. What confused me is when
double clicking the *.RData to launch R, the tempdir() does not respect
the environmental variable TMPDIR, but launch R by double clicking Rgui
icon does.
Hi John:
Can I ask if this is the specific problem you are after, or a test for more
general problem? If the former, the derivative is
-0.0263 + 0.002 * B
so the solution for B is:
B = (0263)/0.002
If you are after a more general way fo doing this:
?solve
-Roy
> On Aug 29, 2020, at 2:
I am trying to find the minimum of a linear function:
y <- (-0.0263*b) + (0.0010*B^2)
I am having GREAT difficulty with the documentation of the deriv function. I
have (after playing for two-hours) been able to get the following to work:
zoop <- deriv(expression((-0.0263*B)+(0.0010*B^2)),"B",fu
Hi Philip,
This ends up being a pretty personal decision, but here's my advice.
I have used Windows of various flavors, and Linux in a couple of versions. I
have also used four or five Unixen, in addition to Linux. I've never spent a
lot of time using a Mac, although in many instances most o
On 29/08/2020 1:10 p.m., Sigbert Klinke wrote:
Hi,
is there in R a way to "normalize" a vector from
compact_intseq/compact_realseq to a "normal" vector?
I don't know if there's a function specifically designed to do that, but
as Henrik proposed, this works:
l_normalized <- unserialize(seri
Dear John,
If you look at the code for logitreg() in the MASS text, you'll see that
the casewise components of the log-likelihood are multiplied by the
corresponding weights. As far as I can see, this only makes sense if the
weights are binomial trials. Otherwise, while the coefficients
thems
For some reason l[[2]] is serialized as a 'compact_realseq' and l[3]]
is not. They both unserialize to the same thing. On Windows I get:
> lapply(l, function(x)rawToChar(serialize(x, connection=NULL, ascii=TRUE)))
[[1]]
[1]
"A\n3\n262146\n197888\n6\nCP1252\n238\n2\n1\n262153\n14\ncompact_intseq
In the book Modern Applied Statistics with S, 4th edition, 2002, by
Venables and Ripley, there is a function logitreg on page 445, which does
provide the weighted logistic regression I asked, judging by the loss
function. And interesting enough, logitreg provides the same coefficients
as glm in the
Does serialize(..., version = 2L) do what you want?
/Henrik
On Sat, Aug 29, 2020 at 10:10 AM Sigbert Klinke
wrote:
>
> Hi,
>
> is there in R a way to "normalize" a vector from
> compact_intseq/compact_realseq to a "normal" vector?
>
> Sigbert
>
> Am 29.08.20 um 18:13 schrieb Duncan Murdoch:
> >
Hi,
is there in R a way to "normalize" a vector from
compact_intseq/compact_realseq to a "normal" vector?
Sigbert
Am 29.08.20 um 18:13 schrieb Duncan Murdoch:
Element 1
A
3
262146
197888
5
UTF-8
238
2
1
262153
14
compact_intseq
2
1
262153
4
base
2
13
1
13
254
14
3
3
1
1
254
Element 2
A
3
26
Dear John,
On 2020-08-29 11:18 a.m., John Smith wrote:
Thanks for very insightful thoughts. What I am trying to achieve with the
weights is actually not new, something like
https://stats.stackexchange.com/questions/44776/logistic-regression-with-weighted-instances.
I thought my inquiry was not t
It is too late to set TMPDIR in .Renviron. It is one of the
environment variables that has to be set prior to launching R. From
help("tempfile", package = "base"):
The environment variables TMPDIR, TMP and TEMP are checked in turn and
the first found which points to a writable directory is used:
On 29/08/2020 11:34 a.m., Sigbert Klinke wrote:
Hi,
if I create a list with
l <- list(1:3, as.numeric(1:3), c(1,2,3))
and applying
lapply(l, 'class')
lapply(l, 'mode')
lapply(l, 'storage.mode')
lapply(l, 'typeof')
identical(l[[2]], l[[3]])
then I would believe that as,numeric(1:3) and c(1,2,
Besides monitization, Windows has a few other things that infuriate
me... (1) VERY hard to control updates, (2) "sneaker" updates - things
installed that people don't want (like trying to force Windows computer
owners to update - and sometimes wrecking the computer when it does),
(3) bad update
Did you really conclude from looking at class that they were identical?
Numeric mode sometimes makes it hard to distinguish integers from doubles, but
they are different.
On August 29, 2020 8:34:29 AM PDT, Sigbert Klinke
wrote:
>Hi,
>
>if I create a list with
>
>l <- list(1:3, as.numeric(1:3),
Hi,
if I create a list with
l <- list(1:3, as.numeric(1:3), c(1,2,3))
and applying
lapply(l, 'class')
lapply(l, 'mode')
lapply(l, 'storage.mode')
lapply(l, 'typeof')
identical(l[[2]], l[[3]])
then I would believe that as,numeric(1:3) and c(1,2,3) are identical
objects. However,
lapply(l, s
Thanks for very insightful thoughts. What I am trying to achieve with the
weights is actually not new, something like
https://stats.stackexchange.com/questions/44776/logistic-regression-with-weighted-instances.
I thought my inquiry was not too strange, and I could utilize some existing
codes. It is
Possibly way off target, but I know some of our U of O teaching
systems boot by reverting to a standard image i.e., you get back
to a vanilla system. That would certainly kill any install.
JN
On 2020-08-28 10:22 a.m., Rene J Suarez-Soto wrote:
> Hi,
>
> I have a very strange issue. I am currentl
Dear John,
On 2020-08-29 1:30 a.m., John Smith wrote:
Thanks Prof. Fox.
I am curious: what is the model estimated below?
Nonsense, as Peter explained in a subsequent response to your prior posting.
I guess my inquiry seems more complicated than I thought: with y being 0/1, how to
fit weig
Hi there,
When I started R by double clicking on Rgui icon (I am on Windows), the
tempdir() returned the tmpdir in the directory I set in .Renviron. If I
started R by double clicking on a *.RData file, the tempdir() return the
tmpdir in the directory setting by Windows system. I don't know whe
Briefly, you shouldn't. One way of seeing it is if you switch the model to y~1,
you still get logLik==0.
The root cause is the rounding in binomial()$aic:
> binomial()$aic
function (y, n, mu, wt, dev)
{
m <- if (any(n > 1))
n
else wt
-2 * sum(ifelse(m > 0, (wt/m), 0) * dbin
> On 25 Aug 2020, at 18:40 , peter dalgaard wrote:
>
> If you don't worry too much about an additive constant, then half the
> negative squared deviance residuals should do. (Not quite sure how weights
> factor in. Looks like they are accounted for.)
>
> -pd
>
>> On 25 Aug 2020, at 17:33 ,
24 matches
Mail list logo