juse(community)Default data frame set to: community
The Quick Start raced to a first result; this page shows what an ordinary working session actually looks like — start to finish. The point isn’t any one command; it’s the order: how a real analysis moves from opening the data to a saved result, and where the everyday “working comfortably” tools fall into place along the way.
It runs on the shipped practice datasets, so you can follow along with nothing of your own: community for the main thread, with a short detour to its messy companion clinic for the one step that needs a dirty column. Swap in your own data wherever you like — the moves are the same.
You don’t need to understand every line below to get the shape of a session. Read it once straight through for the story — load, look, tidy, analyze, save — and don’t worry if a particular function is new. Each one has its own help page (type ? and the name, e.g. ?jdesc), and the earlier Get Started pages introduce the basics. The goal here is the arc, not mastery of every step.
Every session starts by getting the data in front of you and taking a first look. The community data ships with the package, so it’s there by name the moment you run library(jstats) — no importing needed. (Opening a file of your own is covered in Loading, Saving, Converting Data.) juse() sets it as the session default, so later commands don’t need to be told which data frame to use every time.
juse() plays the role Stata’s use does: it names the active dataset once, and the analysis commands that follow assume it. In SPSS terms, it’s a bit like having a single data file open in Data View that every menu command then acts on — except you can load several data frames at once and switch which is the default whenever you like.
With the data loaded, jscreen() is the orientation pass — one call that lists every variable, its type, how many distinct values it has, and anything that looks off (odd values, missing data). stats = TRUE adds the mean and median for the numeric variables.
Data Screening
Using default data frame: community
Cases: 103
Variables: 15
Cases with missing data: 34
Variables with outliers: 0
Variable Types
Variable jstats Class Sub-class Unique Values Mean Median
-------------- ------------ ---------- ------------- --------- ---------
RespondentID Categorical identifier 103
Income Numeric 49 49855.670 49000.000
Education Categorical 5-category 5
Age Numeric 41 40.650 40.000
WellbeingScore Numeric 41 50.893 50.000
Volunteer Categorical dichotomy 2 0.476
OwnsHome Categorical dichotomy* 2 1.534
Smoker Categorical dichotomy 2 0.337
CommuteTime Numeric 42 30.738 30.000
Region Categorical 4-category 4
Environment1 Categorical Likert 5
Environment2 Categorical Likert 5
Environment3 Categorical Likert 5
Environment4 Categorical Likert 5
Environment5 Categorical Likert 5
* coded other than 0/1; mean is not a proportion
Missing Data & Outliers (outliers > 3 SD from mean)
Variable Missing % Missing
------------ ------- ---------
Income 6 5.8
Education 6 5.8
Smoker 5 4.9
Environment1 12 11.7
Environment3 12 11.7
Note: SPSS-style declared missing values on: Income, Education, Smoker,
Environment1, Environment3.
jstats treats these as missing; base R functions do not.
A screen like this is where you catch problems early — a variable that should be a 0/1 dichotomy showing values of 1 and 2, say, or a “score” with values far outside its possible range. That second one is exactly what we tackle next.
community ships clean, which is convenient but not realistic — real data usually need some tidying before they can be trusted. So for this one step we detour to clinic, jstats’s deliberately messy companion dataset (also shipped, so it’s available by name too), clean a column there, and then return to community for the rest of the session.
Loaded the jstats example dataset 'clinic'
4 variables have SPSS-style missing values:
Stress: -99 ["Refused"], -98 ["Don't know"]
SleepHours: -99 ["Refused"], -98 ["Don't know"]
Medication: -99 ["Refused"]
Anxiety4: -99 ["Refused"], -98 ["Don't know"]
jstats analyses treat these codes as missing. Base R functions do not.
To make them missing in base R as well, convert:
jconvert(clinic, to = "stata", modify = TRUE)
Missing-value codes detected:
MoodRating: -99 (4), -98 (3)
Anxiety2: -99 (3), -98 (3)
These codes match the missing.convention.codes setting (-99, -98, -97) but are
not formally declared, so they are not treated as missing.
Declare them as missing if they are; leave as-is if real.
No missing-value convention is selected, so these codes cannot be declared yet.
Choose one for this session:
joptions(missing.convention = "stata")
Lowercase markers behave as true NAs in base R.
Recommended if you also run base R or AI-generated code.
joptions(missing.convention = "spss")
Codes stay visible numbers; jstats treats them as missing.
Base R does not.
joptions(missing.convention = "sas")
Like Stata, with uppercase markers (.A-.Z).
To make the choice permanent, put the same line in your .Rprofile.
Then, to declare one variable's codes as missing:
jdeclare_missing(clinic, MoodRating, codes = c(-99, -98), modify = TRUE)
To declare and label them in one call, replacing the placeholder names:
jdeclare_missing(clinic, MoodRating,
codes = c("label1" = -99, "label2" = -98), modify = TRUE)
Default data frame set to: clinic
Loading it first isn’t something you’d normally write — clinic is there by name as soon as jstats is loaded — but it guarantees a clean copy whatever you did with it elsewhere. Notice what jstats says on the way in: it reports the columns whose missing-value codes were declared before the data reached you, and separately flags undeclared codes that match the numbers it watches for as missing-value codes — listing, since no convention is chosen yet, the three to choose from. MoodRating is in that second group.
That column is meant to run from 1 to 10, but it arrived with two stand-in codes buried in it as ordinary numbers: -99 for “Refused” and -98 for “Don’t know” — the usual state of affairs after an import from Excel or from a CSV file (comma-separated values, a plain-text spreadsheet), where the file carries no record of what those numbers mean. Until we tell jstats they stand for missing, they are treated as real values and quietly poison every statistic:
Descriptive Statistics
Using default data frame: clinic
70 Cases in the 1 Variable Pool
Variable Total Non_missing Min Max Mean SD
---------- ----- ----------- --- --- ------ ------
MoodRating 70 70 -99 9 -4.943 31.477
The mean is dragged far below the 1–10 range, because those large negative codes are being averaged in as if they were genuine ratings. jdeclare_missing() fixes this the careful way — it declares the two codes as missing, with labels, so jstats sets them aside and still knows which was “Refused” and which “Don’t know.” No case is deleted.
Error: jdeclare_missing(): no missing-value convention is selected, so these
codes cannot be declared.
Choose one for this session:
joptions(missing.convention = "stata")
Lowercase markers behave as true NAs in base R.
Recommended if you also run base R or AI-generated code.
joptions(missing.convention = "spss")
Codes stay visible numbers; jstats treats them as missing.
Base R does not.
joptions(missing.convention = "sas")
Like Stata, with uppercase markers (.A-.Z).
To make the choice permanent, put the same line in your .Rprofile.
jstats stops rather than guessing. Missing values can be stored in three different forms — one for each of the major statistics programs — and because they behave differently once the data leave jstats, it asks you to choose rather than picking for you. Stata-style is the choice jstats itself recommends for anyone who also runs base R, so that is the one we take here. Telling jstats about missing values covers what the three forms are and how to choose between them. (If you didn’t see that error, you have already chosen a convention — on another page, or in your Project’s .Rprofile — and that is the setting doing its job.)
Options Settings
Missing-value convention: Stata-style
Run joptions() to see all settings.
Note: the clinic data frame uses SPSS-style missing values.
To convert it to match this setting, run:
jconvert(clinic, to = "stata", modify = TRUE)
Declared and converted to Stata-style missing values on MoodRating:
.a ["Refused"] (from -99)
.b ["Don't know"] (from -98)
This call changes clinic only if you assign the result:
clinic <- jdeclare_missing(clinic, MoodRating, ...)
To change clinic directly, rerun with modify = TRUE:
jdeclare_missing(clinic, MoodRating, ..., modify = TRUE)
Note: MoodRating uses Stata-style missing values, but other columns in clinic
are SPSS-style.
To align MoodRating with the rest, run:
jconvert(clinic, vars = "MoodRating", to = "spss", modify = TRUE)
Descriptive Statistics
Using default data frame: clinic
70 Cases in the 1 Variable Pool
Variable Total Non_missing Min Max Mean SD
---------- ----- ----------- --- --- ----- -----
MoodRating 70 63 1 9 5.460 1.702
Now the codes are set aside as missing and the mean sits sensibly inside the 1–10 range.
jstats says three different kinds of thing, and it is worth learning to tell them apart at a glance.
A Note is information. Something worth knowing happened, and nothing is wrong — the “Default data frame set to” line and the missing-value reports above are notes.
A Warning means the command ran, but the result may not be what you expected. Later on this page jalpha() warns that an item looks reverse-keyed: the reliability figure it printed is real, and it is also probably not the number you want.
An Error means the command did not run at all, and nothing changed. The one you just saw is an error — jstats declined to guess a convention, so no declaration was made until you chose one.
The practical difference is what to do next. A note needs nothing. A warning asks you to look at the result before trusting it. An error asks you to change something and run the line again.
This is the equivalent of setting a variable’s missing values in SPSS’s Variable View (the MISSING VALUES command in syntax), or Stata’s extended missing values. The important parallel is that the reason survives: unlike recoding to system-missing, which collapses every code into one blank, jdeclare_missing() keeps “Refused” and “Don’t know” distinct and labeled — as flagged codes under the SPSS-style convention, as .a and .b markers under the Stata-style one chosen here — and the declaration can be converted to the other forms later.
Declaring missing values is a small move with a lot behind it — different programs (SPSS, Stata, SAS) record missing data in different ways, and jstats keeps those distinctions straight when you read and write files. Telling jstats about missing values walks the whole business live, from choosing a convention to finding undeclared codes in your own data; Loading, Saving, Converting Data covers the import/export side; and Book 2 covers the cross-program fidelity in more detail, with worked examples. The help page ?jdeclare_missing documents the options.
With the detour done, community is the session default again.
A common early task is combining several survey items into one scale score — but only after checking the items hang together. community has a five-item Environment battery (Environment1 through Environment5).
By default jstats prints variable names, which keeps output uncluttered. But a variable’s label, when it has one, usually carries the actual question wording — and that can be a useful clue when something looks off. So before we start, let’s switch the display to bring the labels along. joutput() sets output preferences for the rest of the session; variable.id = "legend" keeps the short names in the tables and adds a label legend beneath them:
Output Settings
variable.id: LEGEND (override)
Run joutput() to see all settings.
jstats answers with the one setting you changed. (override) flags that variable.id now differs from its default; every other setting is untouched. To see them all, run joutput() with nothing in the parentheses.
You can also set this for a single call, by passing variable.id = "legend" to that function directly instead of session-wide.
variable.id is just one of several display settings joutput() controls. ?joutput lists them all, and the Reference page links every function to its own help. We won’t work through every setting here — the guides are a starting point, not a complete manual — so for the output options covered in more detail, with worked examples, see Book 2.
Now jalpha() reports Cronbach’s alpha and the per-item diagnostics, with each item’s label shown in the legend below:
Reliability Analysis
Using default data frame: community
Case Processing Excluded Remaining
Original -- 103
Auto-listwise 19 84
Analysis N -- 84
Missing data From 103 %
Environment1
Missing 12 11.7
Environment3
Missing 12 11.7
--------------------------------------
Reliability Statistics
Cronbach's Alpha N of Items
---------------- ----------
0.348 5
Item Statistics
Item Mean SD N
------------ ----- ----- --
Environment1 3.131 1.180 84
Environment2 2.869 1.180 84
Environment3 3.060 1.226 84
Environment4 3.333 1.186 84
Environment5 2.762 1.470 84
Warning: The following item is negatively correlated with the rest of the
scale: Environment2.
It may need reverse-coding, or may not belong in the scale -- check the
item-total table and the item wording.
Item-Total Statistics
Item Corrected Item-Total r Alpha if Item Deleted
------------ ---------------------- ---------------------
Environment1 0.510 -0.006
Environment2 -0.660 0.783
Environment3 0.539 -0.052
Environment4 0.447 0.056
Environment5 0.455 -0.030
Variable Labels:
Environment1 = Climate change is a serious threat.
Environment2 = Concern about the environment is exaggerated. R
Environment3 = Government should do more for the environment.
Environment4 = I would pay more for environmentally friendly products.
Environment5 = Pollution is a major cause of public health problems.
jalpha() flags Environment2 as reverse-keyed: it correlates negatively with the rest, which drags the reliability down. The label legend tells you why — Environment2’s label ends in “R”, the marker this dataset’s author used for a reverse-coded item. Your own data won’t always be flagged so conveniently, but the label wording is often the tell on its own: a positively phrased item sitting among negatively phrased ones is exactly the kind of thing that surfaces here. We fix it by recoding the item into a new column that runs the same direction as the others. jrecode() returns the recoded variable, which we store as a new column:
Note: This call changes community only if you assign the result:
community$<name> <- jrecode(...)
To check the recode landed correctly, compare jfreq() on the original and the
new column.
That map = "1=5; 2=4; ..." is the same idea as SPSS’s RECODE Environment2 (1=5)(2=4)(3=3)(4=2)(5=1) INTO Environment2R. Storing the result in a new column (Environment2R) rather than overwriting the original is the safe habit — the original item stays intact in case you need it.
Run jalpha() again with the reversed item in place of the original:
Reliability Analysis
Using default data frame: community
Case Processing Excluded Remaining
Original -- 103
Auto-listwise 19 84
Analysis N -- 84
Missing data From 103 %
Environment1
Missing 12 11.7
Environment3
Missing 12 11.7
--------------------------------------
Reliability Statistics
Cronbach's Alpha N of Items
---------------- ----------
0.827 5
Item Statistics
Item Mean SD N
------------- ----- ----- --
Environment1 3.131 1.180 84
Environment2R 3.131 1.180 84
Environment3 3.060 1.226 84
Environment4 3.333 1.186 84
Environment5 2.762 1.470 84
Item-Total Statistics
Item Corrected Item-Total r Alpha if Item Deleted
------------- ---------------------- ---------------------
Environment1 0.691 0.774
Environment2R 0.660 0.783
Environment3 0.694 0.773
Environment4 0.679 0.778
Environment5 0.445 0.854
Variable Labels:
Environment1 = Climate change is a serious threat.
Environment2R = Concern about the environment is exaggerated. R (recoded)
Environment3 = Government should do more for the environment.
Environment4 = I would pay more for environmentally friendly products.
Environment5 = Pollution is a major cause of public health problems.
With the item reversed, reliability improves — but the diagnostics now point at Environment5: it has the weakest corrected item-total correlation and the highest “Alpha if Item Deleted,” meaning the scale would be a touch more reliable without it. So we drop it and build the scale from the four items that hang together, as a per-case mean with javg(), requiring at least three of the four present so a respondent who skipped one still gets a score:
Mean of 4 variables computed for 103 cases (min.valid = 3: 14 cases used
partial data, 5 set to NA due to missing values).
Mean of the new variable: 3.178.
Note: javg() returns the scores; assign them to a column to keep them:
community$<name> <- javg(...)
For the full distribution (min, max, SD), run jdesc() on the new column.
Descriptive Statistics
Using default data frame: community
103 Cases in the 1 Variable Pool
Variable Total Non_missing Min Max Mean SD
-------- ----- ----------- ----- ----- ----- -----
EnvScale 103 98 1.000 5.000 3.178 0.973
Variable Labels:
EnvScale = Environment scale (mean)
Book 1 covers what Cronbach’s alpha measures and why a reverse-keyed item has to be flipped before it’s trusted; Book 2 covers jalpha()’s and javg()’s options — the min.valid cutoff, alternative reliability handling — in more detail, with worked examples. The help pages ?jalpha, ?jrecode, and ?javg document them as well.
With a clean, prepared dataset, the analysis itself is short. jstats uses the same DV ~ IV formula you’d write in base R, so a linear regression of wellbeing on income and age reads naturally:
Linear Regression
Using default data frame: community
Case Processing Excluded Remaining
Original -- 103
Auto-listwise 6 97
Analysis N -- 97
Missing data From 103 %
Income
Missing 6 5.8
--------------------------------------
Coefficients
b SE t β p
----------- ------ ----- ----- ----- -----
(Intercept) 24.815 3.749 6.620 <.001
Income 0.000 0.000 6.813 0.564 <.001
Age 0.181 0.082 2.208 0.183 .030
Outcome:
WellbeingScore = Wellbeing score (0-100)
Predictors:
Income = Annual income (USD)
Age = Age (years)
R-squared: 0.411 Adjusted R-squared: 0.398
Residual Standard Error: 9.013
F-statistic: 32.729 on 2 and 94 DF, p-value: <.001
Sum of Squares:
Regression: 5317.416
Residual: 7635.945
Total: 12953.361
To add a categorical predictor like Region, you tell jstats to treat it as a set of dummy variables. jdummy() registers that once — choosing West as the reference category here — and every analysis that follows honors it, so you don’t re-specify it each time:
Dummy Variable Registration
Using default data frame: community
Variable: Region
Reference category: Region_West
Dummy variables: Region_North, Region_South, Region_East
Cases: 103 (0 missing)
Note: this registration is stored for this session only.
To keep it across sessions, save the data frame in R format (.rds):
jsave(community, "community.rds")
Next session, load that file to restore the registration:
jload("community.rds")
Linear Regression
Using default data frame: community
Case Processing Excluded Remaining
Original -- 103
Auto-listwise 6 97
Analysis N -- 97
Missing data From 103 %
Income
Missing 6 5.8
--------------------------------------
Coefficients
b SE t β p
---------------------- ------ ----- ------ ----- -----
(Intercept) 22.404 4.318 5.188 <.001
Income 0.000 0.000 6.941 0.572 <.001
Age 0.193 0.082 2.342 0.195 .021
Region (ref = 4: West)
1: North 4.905 2.554 1.921 .058
2: South -0.546 2.866 -0.191 .849
3: East 1.250 2.509 0.498 .620
Outcome:
WellbeingScore = Wellbeing score (0-100)
Predictors:
Income = Annual income (USD)
Age = Age (years)
Region = Region of residence
R-squared: 0.444 Adjusted R-squared: 0.413
Residual Standard Error: 8.897
F-statistic: 14.525 on 5 and 91 DF, p-value: <.001
Sum of Squares:
Regression: 5749.301
Residual: 7204.060
Total: 12953.361
jdummy() is doing what you’d otherwise arrange with factor() and contrasts() / relevel(). The difference is that the registration is non-destructive and persistent: Region stays a plain labeled variable in the data, and the dummy treatment lives in a separate registration that jlm(), jlogistic(), and the others look up — so you set the reference category in one place, not inside every model call.
Logistic regression works the same way, with a 0/1 outcome. Volunteer is already coded 0/1, so it drops straight in:
Logistic Regression
Using default data frame: community
Analysis N: 103
Coefficients
b SE Wald df p Gelman β Exp(b)
----------- ------ ----- ----- -- ---- -------- ------
(Intercept) -2.347 0.811 8.382 1 .004 0.096
Age 0.055 0.019 8.216 1 .004 1.284 1.057
Outcome:
Volunteer = Volunteered in past year
Predictors:
Age = Age (years)
Omnibus Test of Model Coefficients
Chi-Square df p
---------- -- ----
9.283 1 .002
Model Summary
-2 Log Likelihood Cox & Snell R² Nagelkerke R² AIC
----------------- -------------- ------------- -------
133.263 0.086 0.115 137.263
Dependent Variable Encoding
Modeled (1): Yes
Reference (0): No
A dichotomy stored as 1/2 (the common Yes/No convention) needs recoding to 0/1 first — jstats will stop with a message telling you exactly that, rather than running something misleading. The recode is a one-liner with jrecode(), the same tool we used on the scale item; ?jrecode documents the options.
Book 1 covers the regression ideas themselves — what the coefficients mean, how dummy variables encode a categorical predictor; Book 2 covers jlm() and jlogistic()’s options and the reference-category choice in more detail, with worked examples. ?jlm, ?jlogistic, and ?jdummy document the options too.
When several variables have missing values, different analyses can quietly run on different subsets of respondents — a regression on these three variables uses a different N than a correlation on those four. When you want a run of analyses to share the same respondents, jcomplete() sets a listwise filter: only cases complete on the variables you name are used, until you turn it off.
Listwise Case Filter
Using default data frame: community
Variable N Missing % Missing
--------- --- ------- ---------
Income 103 6 5.8%
Education 103 6 5.8%
Age 103 0 0.0%
Complete cases: 91 of 103 (88.3%)
Listwise filter activated -- 12 cases will be excluded from
subsequent analyses.
Descriptive Statistics
Using default data frame: community
Case Processing Excluded Remaining
Original -- 103
jcomplete() 12 91 Income, Education, +1 more
Remaining N -- 91
----------------------------------------------------------------
Variable Total Non_missing Min Max Mean SD
-------- ----- ----------- --- --- ------ ------
Age 91 91 18 71 40.484 11.933
Variable Labels:
Age = Age (years)
Every analysis you run now uses just that matching set of cases, so their N’s line up and the results are comparable. (jcomplete() can also preview exactly which cases it would drop before you commit — ?jcomplete shows how.)
The session default, the dummy registration, and the listwise filter all persist by design — that’s what makes them convenient. When you do want to clear them (starting a genuinely separate analysis, or undoing something), each has an off switch:
jcomplete cleared for community (had: Income, Education, Age).
Dummy registrations cleared for community (the default data frame): Region.
Default data frame cleared.
You won’t normally clear these between ordinary analyses — leaving a default and your registrations in place is the point of having them. It’s for a fresh start, or to undo a mistake.
Everything you’ve seen this session came out at jstats’s standard detail level — the default (a bare joutput() names the level on its first line). joutput() also takes an overall level, so you can trim the output or expand it in a single move:
minimal strips the output down to the essential result tables — handy for a clean report or a production script; full turns on the additional tests and notes that standard leaves off. Diagnostics such as Levene’s test are the one exception: no level turns them on, and joutput(diagnostics = TRUE) is their own setting. Important warnings and errors always appear, whatever level you choose.
Each level is a preset for a whole set of individual switches — effect sizes, confidence intervals, the Case Processing Summary, and more — and you can override any one of them on its own, as you did earlier with variable.id. ?joutput lists every setting and what each level turns on; Book 2 covers output control in more detail, with worked examples.
A finished session usually ends by saving the prepared data. jsave() writes the in-memory data frame back out to a file, and jload() reads it back; together they’re the round trip. Across formats — R’s own .rds, plus SPSS, Stata, and Excel — jstats carries value labels, variable labels, and missing-value declarations along as faithfully as each format allows.
Saving across formats is where the missing-value distinctions earn their keep — an SPSS-style code can’t write straight to a Stata file, and Excel stores no missing-value metadata at all, so jstats handles (and warns about) each case. Loading, Saving, Converting Data walks the full cross-format round trip live; Book 2 covers the fidelity rules in more detail, with worked examples. ?jsave and ?jconvert document the options.
Everything above used files you’d save yourself. The package also ships an example SPSS file inside itself — a stand-in for a data file a colleague emails you. Name it as you would a file of your own: when no file of that name is in your folders, jload() looks among the jstats example files, says so as it loads, and opens it like any other received file, missing-value codes and all:
Reading from the jstats example files
Loaded community_received (SPSS format; 103 cases, 15 variables)
5 variables have SPSS-style missing values:
Income: -99 ["Refused"], -98 ["Don't know"]
Education: -99 ["Refused"], -98 ["Don't know"]
Smoker: -99 ["Refused"]
Environment1: -99 ["Refused"], -98 ["Don't know"]
Environment3: -99 ["Refused"], -98 ["Don't know"]
Note: these variables are SPSS-style, but your missing.convention setting
is "stata".
To use SPSS-style missing values, run:
joptions(missing.convention = "spss")
To use Stata-style missing values, run:
jconvert(community_received, to = "stata", modify = TRUE)
Data Screening
Cases: 103
Variables: 15
Cases with missing data: 34
Variables with outliers: 0
Variable Types
Variable jstats Class Sub-class Unique Values Mean Median
-------------- ------------ ---------- ------------- --------- ---------
RespondentID Categorical identifier 103
Income Numeric 49 49855.670 49000.000
Education Categorical 5-category 5
Age Numeric 41 40.650 40.000
WellbeingScore Numeric 41 50.893 50.000
Volunteer Categorical dichotomy 2 0.476
OwnsHome Categorical dichotomy* 2 1.534
Smoker Categorical dichotomy 2 0.337
CommuteTime Numeric 42 30.738 30.000
Region Categorical 4-category 4
Environment1 Categorical Likert 5
Environment2 Categorical Likert 5
Environment3 Categorical Likert 5
Environment4 Categorical Likert 5
Environment5 Categorical Likert 5
* coded other than 0/1; mean is not a proportion
Missing Data & Outliers (outliers > 3 SD from mean)
Variable Missing % Missing
------------ ------- ---------
Income 6 5.8
Education 6 5.8
Smoker 5 4.9
Environment1 12 11.7
Environment3 12 11.7
Note: SPSS-style declared missing values on: Income, Education, Smoker,
Environment1, Environment3.
jstats treats these as missing; base R functions do not.
Variable Labels:
RespondentID = Respondent ID
Income = Annual income (USD)
Education = Highest education level
Age = Age (years)
WellbeingScore = Wellbeing score (0-100)
Volunteer = Volunteered in past year
OwnsHome = Owns home
Smoker = Current smoker
CommuteTime = Daily commute time (minutes)
Region = Region of residence
Environment1 = Climate change is a serious threat.
Environment2 = Concern about the environment is exaggerated. R
Environment3 = Government should do more for the environment.
Environment4 = I would pay more for environmentally friendly products.
Environment5 = Pollution is a major cause of public health problems.
That file arrives with its missing-value codes stored SPSS-style, and because we chose Stata-style earlier in this session, jstats points out the mismatch as it loads and offers both ways to settle it — switch the setting, or convert the data. Neither is wrong, and nothing is broken; it is the same noticing that flagged MoodRating at the top of the page. Telling jstats about missing values covers which way to go.
And that’s a full session, end to end: opened the data, screened it, cleaned a messy column, built and checked a scale, run the models, kept the case base consistent, and saved the result — with the everyday conveniences (juse(), jdummy(), jcomplete()) falling into place as they came up rather than as separate lessons.
This page is the narrative of a session, not a manual: to keep it moving it left a good deal unexplained — including output you saw but we didn’t stop on, like the case-processing block that heads each analysis (sometimes one line, sometimes a small table, reporting how many cases the analysis used and how missing values were handled). For looking a single task up while you work — “how do I reverse-code an item,” “how do I get a correlation matrix” — see the Reference page, which links every function to its full help and its options. And to go further than these guides, the book series covers the analyses and their output in full: Book 1 builds the statistics and R together from the start, and Book 2 is the option-by-option guide — output settings, the Case Processing Summary, and the rest — for readers who already know the statistics.