Displaying 20 results from an estimated 1000 matches similar to: "R-help Digest, Vol 81, Issue 23"
2009 Nov 22
3
Define return values of a function
I have created a function to do something:
i <- factor(sample(c("A", "B", "C", NA), 793, rep=T, prob=c(8, 7, 5,
1)))
k <- factor(sample(c("X", "Y", "Z", NA), 793, rep=T, prob=c(12, 7, 9,
1)))
mytable <- function(x){
xtb <- x
btx <- x
# do more with x, not relevant here
cat("The table has been created,
2009 Dec 02
4
problems installing R packages
Hi,
I?m trying to install new package in R (version 2.4.0) under windows vista
and i have problems. I always receive the same message:
Erro en zip.unpack(pkg, tmpDir) : no fue posible abrir el archivo
'C:/Program Files/R/R-2.4.0/library/file2019500d/mprobit/libs/mprobit.dll'
It can?t open the file.
I check the compatibility with the version and is ok, I have no idea where's
the problem
2024 Feb 27
1
Interactions in regression
I have no real idea what you are trying to do, but if a table is
what you want, you can probably get it using the table() function.
Or, more likely, the xtabs() function.
Using your example from an earlier post (adjusted to make it
comprehensible to the human mind):
set.seed(1000)
time <- factor(rep(c("Pre","Post"),each=200))
treatment <-
2024 Feb 28
1
Interactions in regression
Hi Rolf,
No it is not.
I don't know to which question did you want to respond ?
I desribed everything in my first email and attached links from SO with
pictures included, which are quite understandable.
Cheers,
Jacek
wt., 27 lut 2024 o 02:29 Rolf Turner <rolfturner at posteo.net> napisa?(a):
>
> I have no real idea what you are trying to do, but if a table is
> what you
2009 Nov 22
1
mac os X: mprobit fails to install
Hi all,
any chance that someone got through the installation problem of
mprobit on mac os X?
Stephane
2009 Nov 21
4
other decriptive stats packages
i just found the following list, i wondered if anybody could add to this as i
have to characterize a large data set and am new to R...the list below was
so helpful....can you add to this???
Just to forestall confusion amongst those who would like to use one of
the functions called "describe"...
Hmisc package - describe
numeric
name
count of observations
count of missing
2007 Mar 26
1
Problem in loading all packages all at once
Hi All
Please see the Rprofile file which i have modified as follows and after
that when I start R then I see that R says to me "TRUE" for all the
packages implying that all loaded at once.
But when i try to use commands as simple as help("lm"), it doesnt work nor
any of the menu "Packages" is not working.
Although the regression using lm ( Y ~ X ) is working
2006 May 09
1
Call recordings management
Hello,
I have been asked if it is possible for recorded calls to be flagged with a decriptive title automatically and filed.
The application is a third party call center operation, where certain customers that engage the call center want
all calls recorded and then a submission of call samples at the end of the calling period. This is being done
by hand at the moment.
I fully expect that I
2010 Nov 06
1
saddle points in optim
Hi,
I've been trying to use optim to minimise least squares for a
function, and then get a guess at the error using the hessian matrix
(calculated from numDeriv::hessian, which I read in some other r-help
post was meant to be more accurate than the hessian given in optim).
To get the standard error estimates, I'm calculating
sqrt(diag(solve(x))), hope that's correct.
I've found
2009 Nov 21
3
python
Dear R users,
I would like to make my R code for MCMC faster. It is possible to integrate
C code into R but I think C is too complicated for me. I would need a C
introduction only for MCMC and I do not know if such a thing exists.
I was thinking of Python (and scipy). Where could I read about its
integration into R ? How developed are the statistical packages in Python ?
I could not find a
2012 Nov 15
1
hessian fails for box-constrained problems when close to boundary?
Hi
I am trying to recover the hessian of a problem optimised with
box-constraints. The problem is that in some cases, my estimates are very
close to the boundary, which will make optim(..., hessian=TRUE) or
optimHessian() fail, as they do not follow the box-constraints, and hence
estimate the function in the unfeasible parameter space.
As a simple example (my problem is more complex though,
2010 Jul 26
1
After writing data in MMF using SEXP structure, can i reference in R?
Hi all,
After writing data in MMF(Memory Map File) using SEXP structure, can i
reference in R?
If input data is larger than 2GB, Can i reference MMF Data in R?
my work environment :
R version : 2.11.1
OS : WinXP Pro sp3
Thanks and best regards.
Park, Young-Ju
from Korea.
---------[ ???????? ???????? ???????? ]----------
???????? : R-help Digest, Vol 89,
2008 Apr 29
1
NumDeriv - derivatives of covariance matrix
Hello R-help,
I need to compute matrices of first derivatives of a covariance matrix C
with entries given by c_ij=theta*exp(-0.5* sum(eta*(x[i,]-x[j,])^2)), wrt to
elements of eta, a m-dimensional vector of parameters, given a n*m data
matrix x. So far, I have been computing matrices for each parameter (given
by par[index]) analytically, using the following
kmatder<- function(x, par, index) {
2023 Jan 19
1
c2d4u: apt sees new package version as a downgrade
Hello,
I noticed a strange thing when attempting to upgrade a specific package (lavaan) from c2d4u and wondered if someone could confirm the problem. In short, apt seems to think that an older version from the "universe" repo is higher than the newer version from c2d4u.
When I do
apt-cache showpkg r-cran-lavaan
I get the output at the bottom of this email. Then, I tried to force
2009 Nov 20
2
Problem with Numerical derivatives (numDeriv) and mvtnorm
I'm trying to obtain numerical derivative of a probability computed
with mvtnorm with respect to its parameters using grad() and
jacobian() from NumDeriv.
To simplify the matter, here is an example:
PP1 <- function(p){
thetac <- p
thetae <- 0.323340333
thetab <- -0.280970036
thetao <- 0.770768082
ssigma <- diag(4)
ssigma[1,2] <- 0.229502120
2009 Jun 22
1
The gradient of a multivariate normal density with respect to its parameters
Does anybody know of a function that implements the derivative (gradient) of
the multivariate normal density with respect to the *parameters*?
It?s easy enough to implement myself, but I?d like to avoid reinventing the
wheel (with some bugs) if possible. Here?s a simple example of the result
I?d like, using numerical differentiation:
library(mvtnorm)
library(numDeriv)
f=function(pars, xx, yy)
2009 Nov 22
1
how to tell if its better to standardize your data matrix first when you do principal
Hi guys ,
Im trying to do principal component analysis in R . There is 2 ways of doing
it , I believe.
One is doing principal component analysis right away the other way is
standardizing the matrix first using s = scale(m)and then apply principal
component analysis.
How do I tell what result is better ? What values in particular should i
look at . I already managed to find the
2009 Nov 17
3
re placing the dates format in R for exporting the data set...
hi everyone, i am having difficulties with replacing the dates format in R
for exporting the data set...
eg: the code that i used was
toms_dat<- replace(toms_dat, toms_dat ==2009-08-06, 2)
toms_dat<- replace(toms_dat, toms_dat ==2009-08-04, 1)
but when i export the data as into txt file or excel file the dates come up
with very large numbers .....:drunk:
please help me ...=)
--
View
2008 Jan 26
1
Any numeric differentiation routine in R for boundary points?
Hi, I have a scalar valued function with several variables. One of the
variables is restricted to be non-negative. For example,
f(x,y)=sqrt(x)*exp(y), then x should be non-negative. I need the
gradient and hessian for some vector (0,y), i.e., I need the gradient and
hessian at the boudary of parameter space.
The "numderiv" package does not work, even for f(x)=sqrt(x), if you
do
2013 Sep 13
2
R CMD check fails in R-devel r63910
Hi,
The R CMD check is successful in R 3.0.1 but fails to install package
lmerTest under R-devel r63910,
Here is what I get:
** preparing package for lazy loading
Error in reconcilePropertiesAndPrototype(name, slots, prototype,
superClasses, :
no definition was found for superclass "merMod" in the specification of
class "merModLmerTest"
In DESCRIPTION file I have: