Displaying 20 results from an estimated 20000 matches similar to: "nomianl response model"
2010 Oct 13
1
(no subject)
Dear all,
I have just sent an email with my problem, but I think no one can see the red part, beacuse it is black. So, i am writing again the codes:
rm(list=ls()) #remove almost everything in the memory
set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
N <- 200
I <- 5
taus <- c(0.480:0.520)
h <-
2010 Oct 13
4
loop
Dear all,
I am trying to run a loop in my codes, but the software returns an error: "subscript out of bounds"
I dont understand exactly why this is happenning. My codes are the following:
rm(list=ls()) #remove almost everything in the memory
set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
N
2010 Oct 07
3
quantile regression
Dear all,
I am a new user in r and I am facing some problems with the quantile regression specification. I have two matrix (mresultb and mresultx) with nrow=1000 and ncol=nsim, where I specify (let's say) nsim=10. Hence, the columns in my matrix represents each simulation of a determined variable. I need to regress each column of mresultb on mresultx. My codes are the following:
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2008 Nov 25
1
Efficient passing through big data.frame and modifying select
> -----Original Message-----
> From: William Dunlap
> Sent: Tuesday, November 25, 2008 9:16 AM
> To: 'johannes_graumann at web.de'
> Subject: Re: [R] Efficient passing through big data.frame and
> modifying select fields
>
> > Johannes Graumann johannes_graumann at web.de
> > Tue Nov 25 15:16:01 CET 2008
> >
> > Hi all,
> >
> >
2004 Jun 29
0
gambling problem
Hi all
i have an interesting project that i have been working on. i intended to
set this as a first year programming problem but then changed my mind
since i thought that it might be too difficult for them to program.
the problem is as follows:
You have been approached by a local casino in order to
investigate the performance of one of their slot machines.
The slot machine
2011 Nov 07
1
How do I return to the row values of a matrix after computing distances
## Package Needed
library(fields)
## Assumptions
set.seed(123)
nsim<-5
p<-2
## Generate Random Matrix G
G <- matrix(runif(p*nsim),nsim,p)
## Set Empty Matraces dmax and dmin
dmax<- matrix(data=NA,nrow=nsim,ncol=p)
dmin<- matrix(data=NA,nrow=nsim,ncol=p)
## Loop to Fill dmax and dmin
for(i in 1:nsim) {
dmax[i]<- max(rdist(G[i,,drop=FALSE],G))
dmin[i]<-
2006 Jul 20
1
Loss of numerical precision from conversion to list ?
I?m working on an R-implementation of the simulation-based finite-sample null-distribution of (R)LR-Test in Mixed Models (i.e. testing for Var(RandomEffect)=0) derived by C. M. Crainiceanu and D. Ruppert.
I'm in the beginning stages of this project and while comparing quick and dirty grid-search-methods and more exact optim()/optimize()-based methods to find the maximum of a part of the
2009 Sep 02
1
problem in loop
Hi R-users,
I have a problem for updating the estimates of correlation coefficient in simulation loop.
I want to get the matrix of correlation coefficients (matrix, name: est) from geese by using loop(500 times) .
I used following code to update,
nsim<-500
est<-matrix(ncol=2, nrow=nsim)
for(i in 1:nsim){
fit <- geese(x ~ trt, id=subject, data=data_gee, family=binomial,
2009 Dec 09
1
Why cannot get the expected values in my function
Hi,
In the following function, i hope to save my simulated data into the
"result" dataset, but why the final "result" dataset seems not to be
generated.
#Function
simdata<-function (nsim) {
result<-matrix(NA,nrow=nsim,ncol=2)
colnames(result)<-c("x","y")
for (i in 1:nsim) {
set.seed(i)
result[i,]<- cbind(runif(1),runif(1))
}
2007 Oct 03
2
Speeding up simulation of mean nearest neighbor distances
I've written the function below to simulate the mean 1st through nth
nearest neighbor distances for a random spatial pattern using the
functions nndist() and runifpoint() from spatsat. It works, but runs
relatively slowly - would appreciate suggestions on how to speed up
this function. Thanks. --Dale
library(spatstat)
sim.nth.mdist <- function(nth,nsim) {
D <- matrix(ncol=nth,
2006 Mar 08
1
power and sample size for a GLM with Poisson response variable
Craig, Thanks for your follow-up note on using the asypow package. My
problem was not only constructing the "constraints" vector but, for my
particular situation (Poisson regression, two groups, sample sizes of
(1081,3180), I get very different results using asypow package compared
to my other (home grown) approaches.
library(asypow)
pois.mean<-c(0.0065,0.0003)
info.pois <-
2004 Jun 22
0
prcomp & eigenvectors
I have the following situation I want to analyse with prcomp.
Each subject has a curve called the contrast sensitivity function (CSF).
This curve's overall shape is due to the additive output of 3 "channels"
(eigenvectors).
#this shows 3 SF channels; net CSF = c1 + c2+c3
x<-1:100
c1<-dnorm(x,mean=20,sd=20)
c2<-dnorm(x,mean=50,sd=20)
c3<-dnorm(x,mean=80,sd=20)
2008 Apr 08
1
Weibull maximum likelihood estimates for censored data
Hello!
I have a matrix with data and a column indicating whether it is censored
or not. Is there a way to apply weibull and exponential maximum
likelihood estimation directly on the censored data, like in the paper:
Backtesting Value-at-Risk: A Duration-Based Approach, P Chrisoffersen
and D Pelletier (October 2003) page 8?
The problem is that if I type out the code as below the likelihood
2007 Feb 22
0
Error in solve.default
I am trying to run the following function (a hierarchical bayes linear
model) and receive the error in solve.default. The function was
originally written for an older version of SPlus. Can anyone give me some
insights into where the problem is?
Thanks
R 2.4.1 on MAC OSX 2mb ram
Mark Grant
markg at uic.edu
> attach(Aspirin.frame)
> hblm(Diff ~ 1, s = SE)
Error in solve.default(R, rinv)
2008 Nov 25
0
Efficient passing through big data.frame and modifying select fields
Hi all,
I have relatively big data frames (> 10000 rows by 80 columns) that need to be exposed to "merge". Works marvelously well in general, but some fields of the data frames actually contain multiple ";"-separated values encoded as a character string without defined order, which makes the fields not match each other.
Example:
> frame1[1,1]
[1] "some;thing"
2009 Mar 09
5
Help
Hello Everyone,
I am trying to excess the inbuit .Fortran and .C codes of R. Can any one
help me in that. For example in kmeans clustering the algorithms are written
in .Fortran I want to access them and see the .Fortran syntax of the codes.
Can any one help me how can I do that?
Thanx,
Nitin Kumar
On Thu, Nov 27, 2008 at 12:00 PM, <r-help-request@r-project.org> wrote:
> Send R-help
2011 Jun 28
1
lattice multiple y-scale possible?
Hi
I am attempting to use the lattice bwplot function to generate boxplots
of numerous parameters (1-panel/parameter) by site (x-axis). The
parameters have quite different ranges of values, so it would be best to
have a separate y-axis range for each panel. Below is a basic example of
what I am trying to do. As is seen, the y-axes need to be scaled
individually to make this useful. Any
2011 May 19
1
Creating a "shifted" month (one that starts not on the first of each month but on another date)
Hello!
I have a data frame with dates. I need to create a new "month" that
starts on the 20th of each month - because I'll need to aggregate my
data later by that "shifted" month.
I wrote the code below and it works. However, I was wondering if there
is some ready-made function in some package - that makes it
easier/more elegant?
Thanks a lot!
# Example data:
2007 Aug 02
1
simulate() and glm fits
Dear All,
I have been trying to simulate data from a fitted glm using the simulate()
function (version details at the bottom). This works for lm() fits and
even for lmer() fits (in lme4). However, for glm() fits its output does
not make sense to me -- am I missing something or is this a bug?
Consider the following count data, modelled as gaussian, poisson and
binomial responses:
counts