Displaying 10 results from an estimated 10 matches similar to: "Simulation confidence interval"
2011 Dec 27
1
rbinom
I have the following code (which I did not write) that generates
data based on a logistic model.? I'm only getting a single record
with y=1.? It seems implausible that in 50k cases that have a
single y=1.? Does that ring alarm bells for anyone else?
?
beta<-c(-1.585600,-0.246900)
betasize<-length(beta)
meanpred<-c(0,35.900000)
varpred<-c(0,1.000000)
#loop code
2010 Sep 19
2
working with eval and environments
I'm trying to get the following section of code to work, I think the problem
is being caused by the assignment of data to the lm function not evaluating
to "train" in the parent environment but I can't seem to figure out how to
do this.
fitmodel <- function(trial,data)
{
wrap.lm <- function(formula,data,...) { cat("in wrap lm",NROW(data),"\n");
2012 Jan 04
1
Is there a way to update a method on an existing Reference Class object?
Hi
Being able to do object oriented programming in R is really good. I
now started using the Reference Classes and really like it.
Though, I have one problem: I cannot find a way to update a method on
an existing object.
The flexibility that scripting gives (really needed for interactive
data analysis) is lost if everything have to be recalculated all the
time.
For example I would normally
2011 Dec 16
1
simulation
I'm using an R program (which I did not write) to simulate multilevel data
(subjects in locations) used in power calculations. It uses lmer to fit a
mixed logistic model to the simulated data based on inputs of means,
variances, slopes and proportions:
?
(fitmodel <- lmer(modelformula,data,family=binomial(link=logit),nAGQ=1))
where modelformula is set up in another part of the program.?
2002 May 17
0
options()$warn==2 and try()
Dear R-help folks:
Here is my platform:
> version
platform sparc-sun-solaris2.7
arch sparc
os solaris2.7
system sparc, solaris2.7
status
major 1
minor 5.0
year 2002
month 04
day 29
language R
I have a
2010 Oct 24
3
Long model formulae
What is a good way to enter a very long model formula. For example:
y ~ Input.2 + Input.3 + ... + Input.1000
(assuming the corresponding dataframe has many other columns).
Is there a way to convert a character string to a formula? Are there command line expansions in R besides the simple '.'?
Thanks.
[[alternative HTML version deleted]]
2010 Mar 27
1
R runs in a usual way, but simulations are not performed
Dear addresses, I need perform a batch of 10 000 simulations for each of
4 options considered. (The idea is to obtain the parameter estimates in
a heteroskedastic linear regression model - with additive or mixed
heteroskedasticity - via the Kenward-Roger small-sample adjusted
covariance matrix of disturbances). For this purpose I wrote an R
program which would capture all possible options (true
2002 May 31
0
Convergence and singularity in glmmPQL
Greetings-
Using R 1.5.0 under linux and the latest MASS and nlme, I am trying to
develop a three-level (two levels of nesting) model with a dichotomous
oucome variable. The unconditional model is thus:
> doubt1.pql<-glmmPQL(fixed = r.info.doubt ~ 1, random = ~1 |
groupid/participantid,
+ family = binomial, data = fgdata.10statements.df)
iteration 1
iteration 2
iteration 3
iteration 4
2011 Nov 15
1
package installtion
I'm getting the following error in a script: "Error: could not find function "lmer."??? I'm wondering of my lme4 package is installed incorrectly.? Can someone tell me the installation procedure?? I looked at the support docs but couldn't translate that into anything that would work.
2002 May 17
1
Re: [R] options()$warn==2 and try() (PR#1570)
>
> I have a function called FitModels(), which simply takes in the
> names of a data.frame and two variable names within that data.frame, and
> fits and returns a list of objects from 2 coxph() fits, one main effects and
> one interaction model. Sometimes the two variables are such that there is a
> warning message: convergence has not been reached, or the X matrix is
>