STATISTICAL SOFTWARE
R Statistical Analysis Service
Scripts That Reproduce From Raw Data
Our R statistical analysis service carries out mixed-model, survival, meta-analysis, latent-variable and Bayesian analysis in R, working from your data and scripts, with the scripts, a report and a record of package versions provided as agreed so that the whole analysis can be rerun from the raw data.
No Commitment Required
Strictly Confidential
In-House PhD-Level Statisticians
Fixed Project Fee
Same-Day Response
What Is R Used For in Research?
R is a free, open-source language and environment for statistical computing, distributed through CRAN and extended by a large library of contributed packages. Researchers choose it for packages that cover mixed models, survival analysis, meta-analysis, structural equation modeling and Bayesian methods, and because scripts and Quarto or R Markdown documents can reproduce an analysis from the raw data to the final table. OnlineSPSS, a specialist statistical consultancy for academic, clinical and professional research, provides an R statistical analysis service in which an in-house PhD-level statistician carries out the agreed analysis in R, working from your data and code and recording the packages and settings so that the analysis can be rerun.
WHEN TO ENGAGE
Four Points at Which Researchers Bring Us an R Project
Whether your code is new, inherited or no longer reproduces, an R statistician starts from a clean session, and each of these four requests begins there.
Model to Fit and Report The model is chosen, and the question is which package and settings fit it: the code is written, its defaults are checked against the design, and the estimates are reported with their intervals.
Script That Will Not Reproduce Results change between sessions or machines because of package versions, random seeds or objects left in the workspace, and the analysis has to run again from the raw data.
Code to Review or Extend A coauthor's script, a lab's shared code or code drafted with an AI tool needs extending, and R data analysis consulting on such code tests each step against the methods section, since code that runs can still fit a different model.
Report to Build A manuscript, thesis or supplement needs its tables and figures generated from the data in a Quarto or R Markdown document, so that the text and the numbers cannot drift apart.
ANALYSES IN R
Analyses Carried Out in R for Your Research Design
The package follows the model the design requires, and each card links to the method page where the choice of approach is explained.
Linear Mixed Models (Multilevel Modeling)
Clustered and repeated data are fitted with lme4, random effects are chosen from the design, convergence warnings are investigated, and fixed effects are reported with confidence intervals.
Survival Analysis
The survival package handles time-to-event data once the event, the time origin and the censoring are defined, and hazard ratios are reported after proportional hazards has been examined.
Meta-Analysis
Study-level effects are pooled with metafor under a stated common-effect or random-effects model, and heterogeneity, prediction intervals and small-study checks are reported.
Structural Equation Modeling (SEM)
Measurement and structural models are specified in lavaan, fit is judged from several indices together with the parameter estimates, and any modification is justified by theory.
Bayesian Analysis
Bayesian models are fitted through Stan-based packages such as brms, with priors stated and justified, sampling diagnostics checked, and posterior summaries reported with credible intervals.
Multiple Imputation
Missing data are imputed by chained equations with mice, the imputation model includes the variables of the analysis model, and estimates are pooled across the completed datasets.
COMMON R ISSUES
Where R Analyses Go Wrong Before the Model
R rarely stops when something is misspecified: the model runs, and the coefficients are simply different from those intended, so each check below is made before an estimate is reported.
Factor, Character and Numeric Types A numeric code fitted as a number becomes a slope, not a set of categories. Since R 4.0, text columns are no longer read as factors by default, so older code can stop or behave differently. Types are set explicitly.
Reference Categories and Contrasts The first factor level, alphabetical by default, becomes the reference category, and ordered factors receive polynomial contrasts. Levels and contrasts are set so that coefficients compare what the study intends.
Package Versions and Defaults Defaults differ between packages and change between versions, so results can shift after an update. The versions used are recorded, and the settings that matter are stated in the code.
Seeds and Random Numbers Bootstrap, simulation, cross-validation and Bayesian sampling use random numbers, so a seed is set and recorded. Random-number generation has also changed between R versions, so the version is noted.
Sequential Sums of Squares Base R's anova() tests terms in sequence (Type I), so with unbalanced data each test depends on the order of entry. The type is chosen for the hypothesis and named in the report, and Type III tests use sum-to-zero contrasts.
Objects Left in the Workspace A script can run only because of objects left in the session from earlier work. Each script is run in order from a clean session, starting from the raw data, before it is delivered.
DELIVERABLES
What You Receive From an R Analysis
The files follow a reproducible R project, agreed in the scope and provided where applicable, so that the whole analysis can be rerun from the raw data.
Scripts and Run Order Scripts, numbered and commented, with a clean run order, so that the entire analysis reproduces from the raw data without manual steps.
Quarto or R Markdown Report Where agreed, a rendered report in which tables, figures and the numbers quoted in the text are generated from the data and updated together.
Package and Session Record The R version, the package versions and the session information, for example as a lockfile, so that the computing environment can be rebuilt.
Cleaned Data and Codebook A cleaned dataset in an open format with a codebook of variable types, factor levels and recoding decisions, and every missing-value rule.
Tables and Figures Tables and figures generated by the code, for example with gt and ggplot2, and exported to Word, LaTeX or HTML as agreed, so that a rerun updates them with the data.
Statistical Interpretation A written reading of each estimate on the scale its model reports, from log odds turned into odds ratios to posterior intervals, with the limits of the design stated plainly.
OTHER PLATFORMS
When Another Platform May Be More Appropriate
R fits a very wide range of methods, but the platform follows the method and the team, and some projects are better served elsewhere.
ILLUSTRATIVE EXAMPLE
How an R Analysis May Look in Practice
An illustration of how a script that gave different results on two machines was made to reproduce.
ILLUSTRATIVE EXAMPLE · FISHERIES SURVEY RESEARCH · UNITED STATES
An analysis script left by a former postdoctoral researcher was the starting point for a marine research institute modeling how the catch rate of a coastal species varied across years and management zones in multi-vessel survey data.
A linear mixed model of the log catch rate, with random intercepts for vessels, was chosen from the survey design. Two problems appeared on the first run. The zone code was numeric, so it had been entered as a continuous predictor, and a bootstrap interval changed each time the script was run on a different machine. The zone variable was converted to a factor with a reference category chosen in advance, a seed was set, and the package versions were recorded. The script was then run in order from a clean session, and the tables and figures were generated from the data in a Quarto document.
Outcome: The institute received the zone and year estimates with their 95% confidence intervals, a script and Quarto document that reproduce every table from the raw survey data, and a record of the R and package versions used.
This example does not describe a real client or project. We never share details of actual client work, in line with the confidentiality we promise every researcher. This illustrative example is included to show the type, scope, and standard of work involved in this kind of analysis.
RESEARCH DISCIPLINES
Research Fields Where R Is Common
R is widely used in biostatistics, ecology, psychology, the social sciences and bioinformatics, and the same questions about variable types, package versions and run order arise in every field whose analysis lives in code.
HOW WE ASSESS YOUR PROJECT
We Review Your Actual Research
Your assessment is based on a review of your actual research materials and analytical requirements, not a generic project category.
You Submit Your Project Details
Share whatever is available at the current stage, such as the research aim, protocol or proposal, dataset, variable list, manuscript or statistical requirements.
We Review Your Research and Define the Scope
Your statistically trained Research Coordinator reviews the materials to understand the study design, research questions, data structure, analytical requirements and expected deliverables. If clarification is needed, additional documents or information can be requested before the assessment is finalized.
Your Analysis Is Completed and Delivered
Once the scope and fixed project fee are agreed, the in-house statistician completes the work and the Research Coordinator remains the communication point through delivery, with the analysis, deliverables and timeline as agreed.
RESEARCHER VOICE
What Researchers Say
Feedback from a biostatistician on factor and numeric types silently changing a model matrix and reference categories.
“We had already done part of the analysis in R, but I was not confident about factor and numeric types silently changing the model matrix and reference categories. The team checked the underlying setup and delivered the results with the relevant scripts or project files, so we could trace what had been done.”
Statistical Support Within Your Research OnlineSPSS provides the agreed methodological, analytical and statistical reporting support, including the R scripts and reports described in the scope. The researcher or research team retains the scientific question, substantive interpretation, conclusions and overall responsibility for the research.
FREQUENTLY ASKED QUESTIONS
Questions About R Analysis for Research
Short answers to what researchers ask before sharing an R project, from the models and packages we use and existing scripts to reproducibility, platform choice and confidentiality.
Which models do you fit in R, and with which packages?
R statistical modeling at OnlineSPSS uses established packages for each model: lme4 or glmmTMB for mixed models, survival for time-to-event data, metafor for meta-analysis, lavaan for structural equation models, brms for Bayesian models and mice for multiple imputation. The package and its version are named in your methods text, so a reviewer can see exactly what was fitted.
Can you work from scripts I or a coauthor already wrote?
Yes. The scripts are run as they stand to confirm that they reproduce the numbers already reported, and any difference is traced before the code is extended. When the analysis is finished and the only question is whether it is right, Independent Statistical Review checks the code and the results against your methods section.
Can my R analysis be rerun on another computer with the same results?
Yes, within the agreed scope. A reproducible R analysis keeps its scripts and data in one project folder read through relative paths, records package versions in a lockfile such as renv’s, and sets its seeds. It is then rerun on a second machine, and any small numerical differences between operating systems are traced and explained.
Should I use R or the software my coauthors already use?
Use the one that the method and the team require. If your coauthors work in another platform and the model is supported there, staying with them avoids translation work. R is worth the move when a model is best supported by an R package or when open code is needed.
How do you protect my research data and confidentiality?
Your data, scripts and reports are handled confidentially, and project information is not published. An NDA is available where required and can be arranged before sensitive materials are shared. Read more about confidentiality and data security.
What happens when I request an assessment, and how long does it take?
You share your research question, design and relevant materials, such as the dataset and any scripts, and a statistically trained Research Coordinator reviews the request and responds the same day. The analysis, deliverables, timeline and one fixed project fee are confirmed before any work begins, so the timeline follows from the agreed scope.
Still have a question? Find more answers in our full FAQ.
NEXT STEP
Discuss Your
R Analysis With Us
Share your research question, data and any existing scripts, and the models you have in mind. We review the scripts and confirm the R setup before any work begins.
No Commitment Required
Strictly Confidential
Fixed Project Fee
In-House PhD-Level Statisticians
Same-Day Response
Serving Researchers Since 2014